3 ms·
Ask HN: Any good Lisp-lile language that compiles to both JS and Python?
What would be the best recommendations for a Lisp-family language (with macros + friendly to functiona-programming idioms + good suport for repl driven development) that:
1. transpiles to both Javascript and Python,
2. produces readable code in target language, so it can be "ejected out of the project" after the prototype stage, so the final version delivered to client would not contain too "exotic" technologies in it (shipping readable and documented source code is a requirement)?
- jxub 8y agoOff-topic but there's a typo in the title: "lile".
- strangecasts 8y agoIt's not a Lisp, but Haxe ( https://haxe.org/ https://haxe.org/ ) transpiles both to JS and Python. It does have a Lisp interpreter/REPL ( https://github.com/tluyben/hatch https://github.com/tluyben/hatch ) but it won't actually transpile the Lisp code itself. That being said, I think it might be difficult to find a language satisfying (2) - transpilers typically don't target readability, IME.
- tudelo 8y agoFor a fun example of (2) look at GWT.
- dasmoth 8y agoI'm not aware of anything that meets both of these requirements. If you just wanted Javascript, Clojurescript is definitely worth a look, but the readability of generated code is debatable (especially since you're strongly encouraged to use Google Closure compiler, at least for production builds). One thing that's worth a look in terms of being relatively lightweight and scoring well on output readability is https://fennel-lang.org https://fennel-lang.org. That's targeting Lua, but it does seem like a good pointer to how something like what you're asking for could exist, given some work.
- a0-prw 8y agoCommon Lisp has parenscript and Clpython. They might provide what you need.