2 ms·
2. Do not remove the cpp preprocessor. 7. One-time declaration/definition of functions. Aren't these in conflict? A C-style preprocessor is crippled without t
by alextgordon 16y ago
2. Do not remove the cpp preprocessor.
7. One-time declaration/definition of functions.
Aren't these in conflict? A C-style preprocessor is crippled without the header-file model. You'd do better to replace it with some other kind of metaprogramming.
- wvenable 16y agoIf you've got one-time declaration/definition of functions, that's just one less thing you need the CPP preprocessor for. There would be no conflict, it would just end up being used for macros only. I think you might be right though, I'd loose the cpp preprocessor but add built-in hygienic macros and constants to make up for the loss.
- JoachimSchipper 16y agoIt's not impossible to imagine a language like C, but with the additional property that any (non-static) function defined in any input file can be used (without a prototype/header) in any other input file. (I.e. all 'undefined function' errors are replaced by a lookup once everything has been compiled.) Of course, the above model will most likely increase (re-)compilation times.
- lallysingh 16y agoIf that's bad, try doing closures without garbage collection.