Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That type declaration is easily as unreadable as any "pointer to function returning pointer" declaration in C.


What nonsense, where is there any remote ambiguity? Where is it even slightly unreadable?


Reads pretty clearly left-to-right to me:

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 )




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: