2 ms·
Thanks for an awesome answer. I agree that your approach with format strings is right, but it was great to hear reasoning against the other options. I agree th
by dirtyaura 15y ago
Thanks for an awesome answer. I agree that your approach with format strings is right, but it was great to hear reasoning against the other options.
I agree that macros are dangerous for an embedded language. In our iOS C++ framework, they have their uses, mainly if we want to reduce boilerplate code, when
- bridging ObjC/C++ worlds
- creating e.g. record data types with JSON parsing & other common functionality for records
- creating handle objects for refcounted objects
but for more complex "embedded languages" we have resorted to C++ templates. Properly used, the give us very nice APIs, but build times are quite bad.
Sidenote: I'd love to get an email notification (opt-in per my comment) from HN if someone answers/comments on my comment. Your answer went unnoticed by me for 2 weeks.