3 ms·
What's the use case for a language like this? I used to very down on C++ but have stopped caring quite so much... Just using C++ and restricting oneself to tem
by sfpotter 10mo ago
What's the use case for a language like this?
I used to very down on C++ but have stopped caring quite so much... Just using C++ and restricting oneself to templates seems like a better bet than this. Or you could use D and have a language whose template experience is much better than C++'s...
Any language this is going to need debug info eventually. One could step through the generated C code, but this is much less pleasant than stepping through the original source.
I also wonder how name mangling is handled?
- masot 10mo agoFor me, it was just to have some fun seeing whether you can get the convenience of generics in C without blowing up the size of a "minimal standards-compliant compiler." E.g., Chibicc[1] is only a few thousand lines of code; adding Gamma to that would not blow it up by much. There's something aesthetically pleasing about knowing I can read the whole thing in a few days. Nothing like that is possible for C++ (or D?) AFAIK. But yes --- for a real project I would absolutely recommend someone use D over this ! [1] https://github.com/rui314/chibicc https://github.com/rui314/chibicc
- sfpotter 10mo agoTotally fair. Just wondering if there was some specific motivation for being able to do this... "For fun" is valid, IMO. ;-)