logoalt Hacker News

tayo4201/15/20263 repliesview on HN

Interesting I feel like I'd rather go the other way, write something in a language with nice syntax and features, then transpile to go


Replies

jerf01/15/2026

There are a number of little projects like that but I'm not aware of any that have attained liftoff.

Javascript was a weird exception, being rigidly the only thing available in the browser for so long and thus the only acceptable "compile target" for anything you want to run in the browser. In general I can't name very many instances of "write in X and compile it to Y", for some Y that isn't something you are forced to use by a platform, being all that successful. (See also assembler itself.) The Javascript world gives a false signal of this being a viable approach to a project; in general it doesn't seem to be.

(Note this is a descriptive claim, not a normative one. I'm not saying this is how it "should" be. It just seems to be the reality. I love people trying to buck the trend but I am a big believer in realizing you are trying to buck a trend, so you can make decisions sensibly.)

show 1 reply
aperturecjs01/16/2026

Try this! It works going the other way, just use esbuild to target ES2020 before you run in it. If you want to transpile to Go that's also interesting, probably tsgo's ast parser can be leveraged to do that. See: https://github.com/aperturerobotics/go-quickjs-wasi-reactor

adsharma01/15/2026

If there is such an interesting language, you can transpile to static python first and then use py2many to gain access to many systemsey languages.

The other option is to evolve static python into such a language. Looking forward to the PEP that proposed DSLs in Python.