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

Yea I don't use Go, tried it many moons ago, those were my impressions of the syntax, was going to edit with real code.

Rob Pike made an interesting argument about dynamic vs compiled languages. Said that the division between easy of use and performance, dynamic interpreted vs static compiled was not caused by technical problems, just dumb luck. People that made up dynamic languages weren't interested in performance, didn't design around it.

Maybe now they're perpetuating the same division in syntax. System language syntax is weird, machine looking, dynamic language syntax reads more like English. Doesn't have to be that way, but it would be the system guy's preference. So I was thinking if the dynamic language camp used to Python's syntax took up Go, maybe it would be changed for their taste.

The channel <- syntax is crazy. In and out depends on which side of the operator channel is in. I'm sure they thought it was cute, but "into" "out" keywords are easier to keep track of than which side the channel var name is on.



"System language syntax is weird, machine looking" - But if it's your job to program in C/C++/Go, you begin to read the code just like English. Go's syntax, you will admit, is much cleaner than C++'s. Personally I like blocks of code being separated by curly braces, I think it helps keep them separate. Combined with Gofmt, which automatically indents code (like Python), I find Go very readable indeed.

I don't understand your objections to the channel syntax; the order of the letters you type matters, obviously. Again, it's a personal preference, and I'm quite used to C's pre/postfix operators.


My objection is aesthetics. It's subjective, a matter of taste.

I prefer languages that you don't have to get used to. They're obvious, like a good user interface is obvious. Anyone can read their code, even if they don't work in the language. Go could be a language like that, there are no technical roadblocks for doing that, just a matter of the audience's taste.


"I prefer languages that you don't have to get used to."

Is there such a thing?


Of course - every language that is similar to one you already know well :)


Most people would consider Lisps, Perl and JavaScript to be dynamic languages. The first two are commonly thought to have "weird" syntax and the last has a C-like syntax --and C is the main example of system programming language. (Maybe JavaScript is a bad example since the part of C syntax people most often complain about is the declarations, which JavaScript of course doesn't have; I think the bits of C syntax JavaScript keeps are not so controversial...)




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

Search: