3 ms·
I'm working on this programming language that compiles to Go. The goal is to have it behave like typescript for Go, where any Go program would compile out of t
by alain_gilbert 1y ago
I'm working on this programming language that compiles to Go.
The goal is to have it behave like typescript for Go, where any Go program would compile out of the box, but then you can use the new syntax.
Featuring: built-in Set/Enum/Tuple/lambda/"error propagation operators"
It also have a working LSP server and generates a sourcemap, so when you get a runtime stacktrace, it gives you the original line in your .agl file as well as the one in the generated .go file.
I recently finish porting all my "advent of code 2024" in AGL -> https://github.com/alaingilbert/agl/tree/master/examples/adventOfCode2024 https://github.com/alaingilbert/agl/tree/master/examples/adv...
https://github.com/alaingilbert/agl https://github.com/alaingilbert/agl
- zero_shift 1y agoI like the bang operator for propagating errors. Shame to lose multiple returns though
- alain_gilbert 1y agoThat's why there is a "Tuple" expression that you can use instead, which allows you to easily return multiple values, and destructure them as well.
- Yoric 1y agoWell, it seems to support tuples, which are more powerful.
- Yoric 1y agoNice! When I wrote Go, I figured that I would eventually have to do something like that, to fix the glaring omissions in the language. And then I stopped writing Go, but glad to see that someone got around to it!