I'm not sure I completely agree with their reasoning: the example only really got complicated when dealing with function pointers, however that could be simplified with a macro (or a delegate in other languages).
I do agree that C can get complex to read, however I'm not sure switching the type/parameter option is the answer. But then again, I've probably become accustomed to this format. The real test will be using the language for a few weeks... I better start some small hobby projects in Go just to see if I end up liking it!
Go has great support for closures, so you tend to use function types more often (or perhaps just more naturally) than in C.
It is just a matter of getting used to it. I switch back and forth between Go and other languages, and it doesn't bother me. (The thing that does get me is forgetting to use semicolons in other languages.)
int *i, j;
is more than a good enough reason for me. Makes interviews interesting, though: "Why are you repeatedly writing your variables and function parameters incorrectly?" var i int*
var j int
My apologies if this seems like a simple question: I haven't played with the language enough to know :)[EDIT: Sorry, I didn't realize how to format code!]
var i *int
Unlike C, values are always initialized in Go.