Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I still think the major stumbling block for Go is the syntax. I can't put my finger on it, but from the first time I saw it I thought it looked wrong.

Can anyone who shares my opinion chime in on what things they think cause the syntax to suffer aesthetically?



I'm amazed by this particular criticism of Go. Compared to many modern languages (Erlang or Ruby, for example), Go's syntax is barely different to Java or C. But I think it's better than either of those (It's certainly more regular).

Try it for two days and you'll change your mind.

Also, see: http://blog.golang.org/2010/07/gos-declaration-syntax.html


It seems some programmers just will not accept new syntax at all. I think it's a waste of time trying to please these people and, contrary to popular belief, you don't need their blessing to make a successful new language. Coffeescript is an example that supports this.


It's a valid point, but it paints with too broad of a brush. For example, I have enthusiastically moved from JavaScript to CoffeeScript, in part because I love the syntax.

While I know there are programmers who act just like you described, my complaint is with Go's syntax specifically.


I guess it is something like the Valley of The Uncanny for languages. Yes, it looks deceivingly similar to C++, C & Java, but is not any of those. When your eyes see the syntax, your brain expects the functionality to be the same. However Go does introduce fairly radical new paradigms (goroutines, type inference...) that really upsets that initial feeling of familiarity.

I (unlike the majority) like Erlang's completely strange and radical syntax. When I see, it tells me that "there is something completely new happening here, don't expect this to be C++ plus processes" or something like that.


I agree except for the whole ";" "," "." line endings issue. When I can't copy and paste to move lines around without "fiddling" with the line endings, I get angry.


I think the solution is to treat those as line beginnings rather than endings: http://news.ycombinator.com/item?id=2389715


The trouble is that it borrows a lot from C and then subtly changes it for no discernible reason. This is especially true with variable declaration.

Go is the only language I've ever tried for a while and been really put off by the syntax. I can't quite articulate why either. It's not...pretty. I write quite a lot of C++ and Python, so theoretically I should be a pretty good fit for Go. But it doesn't click with me.


There are good reasons. See the blog post I linked to.


I think it's kind of like as a portuguese speaker I can never learn to speak spanish properly. It's easy enough to understand, but I can never remember the different words because it's too similar to compartmentalize.


It's the mix of old-school brace syntax, with the omitted parens which makes it look off to me.


I personally kinda like that decision. You don't need both parens and braces to remove ambiguity. Since braces are useful for denoting code blocks, parens are basically noise.

I'm not a language expert, so if anyone can correct me on the theory I would appreciate it.


I can't think of anyway to get around once you add Static Typing.

Dynamic languages have much more bare function/object definitions.

Haskell does make Types look sexy on the other hand. So yes there could have been some borrowing from there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: