3 ms·
The only correct response is that you are not 100% incorrect. While there are undeniably benefits of not using code generation and simply writing smarter code,
by contingencies 14y ago
The only correct response is that you are not 100% incorrect.
While there are undeniably benefits of not using code generation and simply writing smarter code, sometimes this is not appropriate.
Examples:
(1) you want to keep some high productivity tools to yourself for financial reasons (eg. generating code to distribute to third parties)
(2) you need to generate code with built-in documentation in various human languages, that integrates translations as they occur
(3) your target system is fairly throwaway, you need to dumb down the abstraction level for some less experienced programmers, and it's easy to generate boilerplates
(4) you are writing a model in a model-oriented language (ABNF, ASN.1, etc.), and generating the code in a completely different domain with different (ie. more complete) capabilities
(5) you want to maintain retargetability of your code, ie. ease of switching to a totally new language
(6) you want to target multiple languages, eg. generating protocol implementations for other developers to use
(7) you want to target multiple platforms, eg. generating crappy apps for nth-mobile-platform-of-the-moment
.. or some combination of the above.