Github user itkach commented on the pull request:
https://github.com/apache/thrift/pull/476#issuecomment-98714766
> BonkSet, which in C++ will require comparison operators,
That is a strange requirement and it's not clear how would one go about
providing such comparison operators for generated classes - looks like an issue
with C++ code to me. But this is another discussion. I will restore
ThriftTest.thrift to the way it was and will create a new .thrift file for my
test .
> I also wonder if the compiler is the right place to add the
__thriftCopyXXX functions, I think they should probably belong to the library
code.
That's easy for nodejs, but in a browser environment user would have to
explicitly add dependency on this new library via <script> tag (which is
internal implementation detail and is not to be used for the client code
directly), otherwise generated code would be broken "out of the box". So I
think compiler is, unfortunately, the right place for these functions.
Ideally there would be no compiler for js and no generated javascript at
all, I think it should all be library code that works off of the spec (say
spec'c json representation), but that's not the current approach and is a
discussion for another day.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---