For some reason I find this less readable than the original syntax. I couldn't say why, as I quite like Python or Coffeescript.
iGo: a new Syntax for GoLang
11–20 of 94 posts
Re: iGo: a new Syntax for GoLang
#12Re: iGo: a new Syntax for GoLang
#13Re: iGo: a new Syntax for GoLang
#14Not sure this is what Go needs though.
Re: iGo: a new Syntax for GoLang
#15Re: iGo: a new Syntax for GoLang
#16Gross.
Re: iGo: a new Syntax for GoLang
#17We have gofmt so that everyone's code looks the same, and now this? I don't see the benefit.
Re: iGo: a new Syntax for GoLang
#18The IGo syntax looks very similar to F# with significant whitespace.
Re: iGo: a new Syntax for GoLang
#19My biggest concern in using it would be that its a tool that saves me some keystrokes (perhaps not insubstantial advantage—i'm tired enough of faking partial application in JS that I'm almost ready to start using coffeescript if only for the -> operator) but it doesn't really offer many other advantages, and will probably complicate my life at some point (i.e. i'm grumpy and suspicious of new things. shrug)
Even so, looks fun, and options are good. nice work—hope it gets some traction and evolves.
Re: iGo: a new Syntax for GoLang
#20I do not like the do syntax; for a very dubious improvement in syntax, you turn an N-parameter function into an N-1 parameter function visually. This is a net loss. (Go is not curried.) It's not even a huge character win, given that you've already disposed of the braces. I'm not convinced those stack very composably either, though I'll admit I'm not taking the time to prove that.
In fact, in general be wary of that issue in syntax, real code will encounter all the corner cases that can possibly exist as the elements are composed together. Can I call a
func (string, func(string, func(bool) bool) string)
with your do syntax being used twice? If not, or if it's not easy, that's a bad sign. Vanilla Go I can type that correctly the first time... it may be a lot of braces but it's unambiguous. It may be wise to avoid trying to sugar function applications like that, if you can possibly avoid it.