5 ms·
What are the chances a coffeescript-like language for c++ being adopted? I would think that a python like syntax, with utility methods and such, that compiles t
by lopatin 15y ago
What are the chances a coffeescript-like language for c++ being adopted? I would think that a python like syntax, with utility methods and such, that compiles to c++ would be a huge help if c++ really is going to be adopted more and more in the future.
- phamilton 15y agoWhy compile to c++? Compiling to javascript makes sense because javascript is the lowest common denominator for browsers. Compiling to c++ wouldn't make any sense when you can compile directly to assembly/bytecode. It would be like writing a python like language that compiled to coffeescript. It would be silly not to compile it directly to javascript.
- qdog 15y agoI would think compiling to llvm is probably a better road to go down than compiling to c++, as long as llvm can target the platform you are interested in. C++ could link against your library then. And you could probably do it right now.
- eco 15y agoInterestingly, the original C++ compilers were like CoffeeScript in that they'd compile to C source code. Walter Bright (now of D fame) wrote the first C++ compiler that compiled to machine code. I don't really see this as the approach going forward though. There isn't much to gain from compiling to C++ code over C code.
- rbanffy 15y agoWhy not go the rpython or Cython route? Both have the Python syntax and compile to C. Not very readable C, of course, but not significantly worse than what the first C++ preprocessors did (yes, kids, C++ started its life as a compiler that compiled C++ code into horribly mangled C).