(Yes, I know Rob's and Ken's history with regards to C.)
(Yes, I know Rob's and Ken's history with regards to C.)
---
I like the map. Here's the rules for Conway's Game of Life as a nested map:
var cgol = map[state]map[int]state{
alive: {
0: dead,
1: dead,
2: alive,
3: alive,
4: dead,
5: dead,
6: dead,
7: dead,
8: dead,
},
dead: {
0: dead,
1: dead,
2: dead,
3: alive,
4: dead,
5: dead,
6: dead,
7: dead,
8: dead,
},
}Before C, naturally no-one knew C.
Before Go though, tens of millions know C.
They are casually throwing away all of that familiarity in the name of elegance. I think this is what might mean that Go doesn't "win".
If you class doing basic design work and taking time to document it as "arrogance" then I'm afraid you may be suffering from negative mindset.
That looks like a good deal to me! :)
I can barely read this: void (signal(int, void (fp)(int)))(int);
I can read this easily: func signal(int, func(int)) func(int)
map[state]map[int]state -> a map of state keys pointing to maps of int keys pointing to states
"map of int to string"
map [int] string
"map of state to map of int to state"
map [state] map [int] state
In Rich Hickey terminology, it seems people reject that it is simple (non-interwoven) because it does not strike them as easy (familiar / close to hand).( ...Any excuse to link to this excellent presentation: http://www.infoq.com/presentations/Simple-Made-Easy )