3 ms·
No all those languages suffer (except JS) from the fact they don't give you uniform access. Consider the different forms of access for dict types, array types,
by swannodette 15y ago
No all those languages suffer (except JS) from the fact they don't give you uniform access. Consider the different forms of access for dict types, array types, object types in said languages.
- kenjackson 15y agoI have to admit that this distinction seems really minor. But maybe I'm missing something here. I'd love to see an example if anyone has one.
- swannodette 15y ago(get "foo" 0) ; \f (get {:foo 'bar} :foo) ; bar (get #{0 1 2} 1) ; 1 (get [:a :b :c] 1) ; :b (def path [0 :foo 1]) (get-in [{:foo "bar"} 1 2] path) ;\a Being able to deal with data generically in a first class manner is very, very useful. You can only get this in all the languages you've mentioned (including JS) w/ more or less custom code writing.