4 ms·
I didn't finish reading all the WATs, but if these are the best WATs about Go, it must be a very consistent language. The first two, for example, aren't WATs a
by kbd 8y ago
I didn't finish reading all the WATs, but if these are the best WATs about Go, it must be a very consistent language.
The first two, for example, aren't WATs at all. The Go book is very clear that you need to use the result of `append` to get the modified slice. WAT 4, map traversal is unordered, is not at all a WAT. WAT 7, maps are reference types, is also not surprising at all. WAT 8 is also not a WAT, defers are defined to be processed in LIFO order, and the rest falls out of how named returns work. This was a waste of time :(
- lostmyoldone 8y agoI think that what you are saying is true, in a manner. To my eyes, it is however in the manner that for the small syntax and the small number of idioms, it consistently surpises me how weirdly they interact.
- kbd 8y ago> it consistently surpises me how weirdly they interact. What exactly surprises you? I just read the Go book and none of what I saw was surprising in the least. I consider a WAT something like Python mutable default arguments that are certain to surprise every Python programmer at some point.