5 ms·
Sure. As long as code generators that parse adhoc type descriptions from header comments and spit out code for a homegrown object oriented system / generic data
by Crinus 7y ago
Sure. As long as code generators that parse adhoc type descriptions from header comments and spit out code for a homegrown object oriented system / generic data serialization framework are banned on sight.
Or most code generators in general. If you are using a code generator to bring features from other languages to C then just use those other languages.
- ido 7y agoMy impression is that these are less common in c codebases than simply abusing c++'s built-in features is in c++ one (probably cause the former actually requires a lot more tech skill than the latter). Maybe I'm wrong?
- Crinus 7y agoThey are less common, but in general doing big projects in C as opposed to C++ is less common, at least in my experience (note though that it might be my bias on working with games and desktop software). C doesn't allow for much overengineering and most C projects tend to be simple (well, they tend to be libraries that do mostly one thing) but if someone really wants to overengineer a C project they can put the worst C++ architecture astronauts to shame since as C doesn't allow for much by itself they need to work outside of it (hence generators) and there are no limits to what you can do outside of C.
- apta 7y agoNot very dissimilar from golang as far as (badly implemented) code gen goes.