3 ms·
I like what I see so far at this page [1] and will watch closely to see whether Julia catches on. One thing -- can we call agree that dictionary literals begin
by allochthon 13y ago
I like what I see so far at this page [1] and will watch closely to see whether Julia catches on.
One thing -- can we call agree that dictionary literals begin and end with '{}', that arrays are zero-indexed and that an index into a unicode string is properly a character and not a byte? Or are we doomed to permute endlessly on details such as these? I wish any new languages would set aside a large set of tempting innovations and just go with the flow on the smaller points.
[1] http://learnxinyminutes.com/docs/julia/ http://learnxinyminutes.com/docs/julia/
- 3JPLW 13y agoWell, in many ways, they are going with the flow. They're targeting mathematicians, and R/Matlab users… all of whom use 1-indexed arrays. And, really, the kinds of dictionaries you're used to are constructed with {} braces. The square braces hold more specifically-typed keys and objects. It's a very clever analogy to their typed/untyped arrays. And wonderful for performance. ["one"=> 1, "two"=> 2, "three"=> 3] # -> Dict{ASCIIString,Int64} {"one"=> 1, "two"=> 2, "three"=> 3} # -> Dict{Any,Any}