Replies: 2 comments 6 replies
|
Adhering to RAII would be nice there, indeed. |
0 replies
|
On a somewhat similar topic - so I just add it to this thread instead of a new And sometimes it says I was completely unfamiliar with this syntax, but apparently it's a C++11 thing (my C++ experience predates C++11) - but it initializes the struct with zero or default values. But again, wouldn't it make sense to make those types into C++ classes with a default constructor that initializes the values to zero? I'm unsure now much refactoring is necessary - but I see quite a lot of duplicated code converting a V8 value into a struct to return to the Go caller. |
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Looking at the code to handle errors (which I mentioned should probably also contain a v8 Value).
I also notice that the conversion itself does a bit of cleanup.
I was wondering if it would make sense to have a class in C++ to represent this information, so it would be a simple matter of calling
Maybe the type could take (my C++ is probably wrong, but I'm sure you get the idea).
More cohesive - what changes together, stays together.
All reactions