Remix.run Logo
alain_gilbert 5 days 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/adv...

https://github.com/alaingilbert/agl

Yoric 5 days ago | parent | next [-]

Nice!

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!

jbreckmckye 5 days ago | parent | prev [-]

I like the bang operator for propagating errors. Shame to lose multiple returns though

alain_gilbert 5 days ago | parent | next [-]

That'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 5 days ago | parent | prev [-]

Well, it seems to support tuples, which are more powerful.