This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Here, as I understand, the key is a string - and value is an int...
Yes, you are quite right. You can also do it like this:
or like this if you want it to start out nonempty:
And, of course, you can use other types too.
You are also right that Go only supports post increment, i++. Also, increment is not an expression, so you can not write j = i++ in Go. This avoids lots of potential problems, e.g., f(i++) and f(++i) are legal in C but not in Go.
And in your solution to exercise 44 you return a map that you've allocated inside a function: and this is perfectly good Go style (but would be a disaster in C/C++!) thanks to Go's memory management.