5 ms·
What I want is a language over C++, as typescript is over JavaScript, that keeps compatibility with C and C++ code (Qt, boost...) and provides a clear syntax an
by dasloop 9y ago
What I want is a language over C++, as typescript is over JavaScript, that keeps compatibility with C and C++ code (Qt, boost...) and provides a clear syntax and some advanced features (as reflection) even paying a price for it. This is it, no more zero cost abstraction.
- lossolo 9y agoLike D?
- dasloop 9y agoNo, D is a separate language. A bit too much. Ideally you will be able to move between a version of the language or another at Class level to alllow a incremental migration of the code that must be "modernized".
- deleted 9y ago[deleted]
- NotSammyHagar 9y agoThat is a great idea and great metaphor to describe your new language.
- mabynogy 9y agoI'm doing that but it's more a CoffeScript than a Typescript (no semicolons and no commas). An example: fn add(x1 x2) { return <x1+x2> } fn <main>(count:int arguments:<const char** const>):int { (<printf> "%d\n" (add 2 3)) return 0 } Is converted to: auto add(const auto x1,const auto x2) { return x1+x2; } int main(const int count, const char** const arguments) { printf("%d\n",add(2,3)); return 0; } Everything inside the <angle brackets> is left as is in the C++ output. I use S-expressions for function calls.
- smitherfield 9y agoCython? http://cython.org http://cython.org Yes, it supports C++ (even templates!): http://docs.cython.org/en/latest/src/userguide/wrapping_CPlusPlus.html http://docs.cython.org/en/latest/src/userguide/wrapping_CPlu...
- DerDangDerDang 9y agoThe closest thing I can think of would be the subset of C++ used in Stepanov + McJones' Elements of Programming, with the addition C++11 stuff like lambdas and std::function, plus (hopefully) C++20 stuff like compile-time reflection, concepts and ranges.