

A Tour of Go - mhd
http://go-tour.appspot.com/

======
machrider
It might just be me, but I found myself asking "why?" on most of the first 12
pages that I skimmed through. I don't really understand why there need to be
so many ways to declare a variable or a function. It doesn't make it easier to
have several ways to phrase the same thing, I'd rather just learn the _one_
way to do it.

I've never written a Go program so I don't know if it comes up in practice,
but it seems like this kind of variability makes it harder to learn and harder
to read other people's code (who may not use the same constructs you use).
Something I really appreciate about Python is that it's syntactically
extremely simple and there are very few surprises.

~~~
keeperofdakeys
From the programming I have done, I would say most of the 'repeated'
functionality is things you would have done already, just in different ways.
In fact, things like making the while loop a for loop is taking away things
you don't really 'need'.

It is quite different when compared to python, but it is probably better
compared to C, C++ or even Java. C is nearly 40 years old, a lot of the
decisions that were made in its creation look silly now (terminating strings
with '\0'? yeah, great choice). From what I can see of Go, they try to address
many of these aging conventions.

~~~
Ideka
_(terminating strings with '\0'? yeah, great choice)_

Why? What would have been better?

The only alternative I know about is saving the size of the string, but that
comes with its own little set of problems.

~~~
keeperofdakeys
How about something like a C++ strings? C strings are great for memory-
constrained platforms, like computers were back in the day, or small embedded
computers now. On a modern computer though, it doesn't make sense. The amount
of security problems that C strings cause is unbelievable. So using something
different to C strings would hopefully reduce the amount of buffer overflow
exploits (you would still have unchecked array bounds though, but they would
be less accessible without C strings).

Of course, something like C++ strings might need more processing to do basic
things, but between the OS latency/overhead, I/O times and human perception,
you wouldn't notice any difference at all.

------
supersillyus
It's pretty sweet, but I felt weird clicking "Compile" when I wanted to click
"Run" (or "Compile+Run" or "Go!"). A minor quibble with an otherwise lovely
tutorial.

------
resnamen
I like the live in-browser compiling feature. I would love to see this become
the norm in programming tutorials in the future.

------
civilian
Alternatively, <http://senseis.xmp.net/?WhatIsGo>

------
sytelus
This line just throws me off and don't wanna make me go at it.

import "fmt"

Why would anyone designing language in this decade would allow cryptic names
like this in their "Hello World" code? Besides I still can't see single
compelling reason to throw away all my tools and libraries in exchange of this
thing. Do people create language just for the hack of it?

~~~
enneff
Package fmt is used all the time. It makes sense that it should have a short
name.

~~~
wnight
That was a pretty lame justification in the 1960s. And now we've got macroing
text editors and general purpose compression that can recover the space.

