Ask HN: “CoffeeScript for Go”?

1 points by meowface ↗ HN
1. Is there anything out there that provides a "syntax-sugary" language very similar to Go which compiles to Go, kind of like CoffeeScript for JavaScript?

2. Would any Go developers be interested in using such a language?

I've always thought it could be a cool idea and is something I personally wanted. I've been considering hacking together something like this, but I'd have even more incentive if others were interested.

I don't think I'd do away with braces and use significant whitespace like CoffeeScript does. Rather, just provide sugar for many common operations, probably with a Python or Ruby feel. Things like negative indices, something to reduce repetition for the most common cases of error handling, and one-line anonymous function shorthand.

Obviously this conflicts a bit with Go's fundamental principles of simplicity, but I'm wondering who would consider it a worthy tradeoff and use such a language.

2 comments

[ 3.1 ms ] story [ 16.5 ms ] thread
As far as I know, Agora is kind of what you are looking for: https://github.com/PuerkitoBio/agora
This looks like a really cool project, but is not quite what I'm looking for. It adds some good new features, but also kind of seems to cripple Go a bit? No goroutines, no channels no multiple return values, no slices, no maps, not even optional static typing.