4 ms·
A Lisp dialect that compiles to C++ is interesting. I am not sure if features like Lisp macros would be provided, but still you can compare the versions of 99 b
by pmelendez 12y ago
A Lisp dialect that compiles to C++ is interesting. I am not sure if features like Lisp macros would be provided, but still you can compare the versions of 99 bottles of Beer and see a significant difference: http://www.99-bottles-of-beer.net/language-c++-111.html http://www.99-bottles-of-beer.net/language-c++-111.html
I find the L++ version to be very way more elegant.
Edit: More examples... https://bitbucket.org/ktg/l/src/cb93b589c03ec1e39007c1907deb03d0787f9f17/ex/?at=master https://bitbucket.org/ktg/l/src/cb93b589c03ec1e39007c1907deb...
- jeorgun 12y agoWell, yeah, an actual example of realistic code is going to be more elegant than something that's literally self-parody. int main() { for (int i = 99; i--;) { std::cout << i << " bottles of beer on the wall, " << i << " bottles of beer.\n" << "Take one down, pass it around, " << i << " bottle of beer on the wall."; } } is basically the same thing as the L++ version, with a few added bitshift operators.
- ktg 12y agov0.2: Macros are supported via Racket's macro system define-syntax.