News for hackers. Stuff that matters.
Re:The Idea of Lisp by lemming on Friday December 16, 2016 @09:41AM (#13193500)
Is there any literature on how to translate languages where everything is an expression to ones where it isn't, for example when compiling/transpiling to java? If/then can be translated to the ternary operator, but terms like try/catch are trickier.
Re:The Idea of Lisp by corecoder on Friday December 16, 2016 @11:59AM (#13194659)
An easy to follow example is Coffeescript (where everything is an expression), which transpiles in javascript (where not everything is).
Re:The Idea of Lisp by wtetzner on Friday December 16, 2016 @11:39AM (#13194460)
Usually when I'm faced with putting a try/catch in an expression in Java, I end up wrapping it in it's own method.

It's not the nicest solution, but it would allow targeting Java without disrupting the code structure too much.