Skip to content

Instantly share code, notes, and snippets.

@built
Last active December 17, 2015 05:29
Show Gist options
  • Save built/5558450 to your computer and use it in GitHub Desktop.
Save built/5558450 to your computer and use it in GitHub Desktop.
Notes from first exposure to Go programming.
Meta about Tour of Go
Use of packages is nice.
Import syntax with quotes, as in Ruby. I don't like this. You quote the package name but then refer to the imported thing with a plain identifier? Why not omit the quotes so it is uniform?
Types after identifiers is weird, but I get the motivation. Should have gone all the way so everything works uniformly though.
Pointer syntax didn't have to be a star. Other options available.
Result parameters are interesting. But why do I have to say "return" at all?
Including complex number syntax is nice.
Using dot syntax the same way on reference or pointers seems nice.
There's no concise foreach construct? Seriously? 'range' is helpful but isn't quite what I had in mind.
Slice indexing works like it should.
Having to manage memory in order to make a slice is batshit though.
Using nil. No one learns the billion-dollar mistake, apparently.
Forces One-True-Brace-Style. Kind of lame, but w/e.
The needless shorthand style (eg fmt vs. format) is annoying.
Interfaces can be composed. Nice.
Web app interface is nice and simple.
I think 'make' is just 'malloc'. No 'free' though.
Being able to treat a channel as a collection w/ for-range is nice enough.
I can appreciate what they're going for but really, really would rather have Erlang.
You can use a select/case statement to dispatch, but if you have multiple values ready at the same time it chooses one randomly. WTF?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment