3 ms·
Swift uses annotations (reflection) and generates bytecode on the fly. This fits much better with modern Java development practices and tooling than source code
by electrum 11y ago
Swift uses annotations (reflection) and generates bytecode on the fly. This fits much better with modern Java development practices and tooling than source code generation. Is such a thing feasible C++, especially in an idiomatic way? Or perhaps I am misunderstanding your question.
To my knowledge, our C++ Thrift code is here: https://github.com/facebook/fbthrift https://github.com/facebook/fbthrift
(I work on Presto and occasionally Swift at Facebook, but am not at all familiar with modern C++)
- Serow225 11y agoThanks for the reply! You're right, I should have been more clear - the goal would be to autogenerate Thrift IDL at compile-time from annotations in our C++ source, to avoid having to hand write the IDL. So more in the sprit of Swift rather than a direct parallel.