4 ms·
You could create this as a frontend macro preprocessor that implements new language constructs. Maybe it could be called cfront. I just hope that the usefulne
by IncRnd 5y ago
You could create this as a frontend macro preprocessor that implements new language constructs. Maybe it could be called cfront. I just hope that the usefulness of that doesn't lead to bloated and complex codebases and binaries as features are added to the preprocessor.
- Hirrolot 5y agoThere are several reasons why not to resort to third-party code generators [1]. This includes the burden of maintenance (think about the build process) and seamless integration of native macros with other code. Do you have some code to show bloated binaries with Datatype99/Interface99? The last time I checked the generated assembly code, it was nearly of the same size as hand-written code [2]. [1]: https://github.com/Hirrolot/metalang99#q-why-not-third-party-code-generators https://github.com/Hirrolot/metalang99#q-why-not-third-party... [2]: https://godbolt.org/z/ns6Ma7csd https://godbolt.org/z/ns6Ma7csd
- IncRnd 5y agoThank you. I wasn't talking about what you mentioned. Cfront was the preprocessor that implemented c++ for the first decade of its existence.
- Banana699 5y agoOriginal comment was satirizing C++, it started as a (relatively) simple code generator that consumed a custom OOP variant of C and produced pure C. It grew into... well C++.
- pjmlp 5y agoComplex as it may be, I doubt anyone will be answering every pub quizz questions about C# 10, Java 17, Python 3.9, TypeScript 4.4, ....