[HN Gopher] Show HN: AGL a toy language that compiles to Go
___________________________________________________________________
Show HN: AGL a toy language that compiles to Go
I spent the past 2 weeks making this toy programming language. I
basically forked the Go scanner/parser, and changed the syntax to
have functions return a single value. This enable proper
Result/Option type to be used as well as propagating errors with an
operator. I also wanted to have short "type inferred" anonymous
functions to be able to use functions like Map/Reduce/Filter,
without having to use 100 characters to specify the types.
Author : alain_gilbert
Score : 22 points
Date : 2025-06-25 15:36 UTC (3 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| mayli wrote:
| That's pretty cool, I ways want Result/Option/Err types in
| python.
| 18172828286177 wrote:
| Have you seen https://vlang.io/?
|
| https://docs.vlang.io/type-declarations.html#optionresult-ty...
| in particular
| ben0x539 wrote:
| Cool language. Only two weeks for this? Damn!
|
| This seems to nicely smooth out a lot of the pain points I had
| back when I regularly wrote Go but also switched to other more
| expression-based languages occasionally. Being able to get all
| these conveniences while still being able to call into existing
| Go code seems amazing!
|
| Also, I appreciate the pun, but did you have to use AI for the
| logo? Haha
___________________________________________________________________
(page generated 2025-06-28 23:00 UTC)