If 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.
Re:How to design a replacement for C++
by JoachimSchipper on Thursday July 22, 2010 @07:57AM
(#1537888)
It'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.
Re:How to design a replacement for C++
by lallysingh on Thursday July 22, 2010 @10:57AM
(#1538305)
If that's bad, try doing closures without garbage collection.
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.