Live data from Hacker News

Introducing Go by Example

mmcgrana.github.com

31–37 of 37 posts

Re: Introducing Go by Example

#32

This is an old media presentation of something inherently interactive -- Alan Kay complains about how the wikipedia pages' code examples aren't executable. There is already the well-developed http://tour.golang.org/ , which can be used freely.

That tour looks like a worthy introduction, and yet I for one appreciate the old media approach here. It's nice to keep tutorial in one window, code in another, and build the examples on my own system as I would a real application.

Re: Introducing Go by Example

#33

I really like the way this is set up with lengthy examples next to the explanatory text. I look forward to reading through it. Thanks! In the meantime, mind a quick comment on the typography? The Palatino Linotype body text renders poorly on Windows. Italics are particularly hard to read. I tried changing it to Georgia and it made a world of difference: http://mg.to/images/go-by-example-palatino.png http://mg.to/imag…

Great feedback - thanks. Georgia also works well on Mac, so I just shipped this as the default.

Nice! Thanks for the quick update.

Re: Introducing Go by Example

#34

This is an old media presentation of something inherently interactive -- Alan Kay complains about how the wikipedia pages' code examples aren't executable. There is already the well-developed http://tour.golang.org/ , which can be used freely.

The tour has the unfortunate property of being both a top result for many golang searches and not being deep-linkable. I welcome additional introductory material.

Re: Introducing Go by Example

#36
post #29
post #20

Quick Go question. I haven't done much go coding at all, but play around with the language. I've been reading a lot about it (thanks to HN). So I was now looking at the Slices section and noticed a slice being initalize as: t := []int{1, 2, 3, 4, 5} What makes that a slice and not an array? EDIT: Ok, found that answer on google go's blog. Apparently leaving out the length makes it one.

Arrays are a fixed size. eg. t:=[5]int{1,2,3,4,5} Go can also do the counting for you. eg. t:=[...]int{1,2,3,4,5}

Oh, nice, thanks!

Re: Introducing Go by Example

#37

Very cool. Maybe Go will win some people back to the strongly typed language realm. Having the compiler acts as a safety net is pretty awesome. Much better than having your code blow up at run time with dynamic languages.

All programs can blow up at run time, the real question is if "strongly typed" is a good tradeoff. How many actual bugs does the compiler catch? Is it worth the extra pain?

Also, dynamic languages has a tendency to "blow up" in less serious ways..

Post reply on HN