This is an outcome of an underlying as-yet-unresolvedness, one all agree is 
important as it must shape some of the experience one has with Julia. 
 Stefan makes good sense: "In Julia, [Dict is] just another data structure 
... So having special syntax ends up being  ... problematic and 
[un]helpful."  And so do you, Michael because syntax that erupts in natural 
application is not yet well-situated; that David is having flashbacks is 
proof enough. If there were one not-overly-recondite macro that gave back 
some expressive parsimony .. there is not, and if there were it would be 
like finding your friend came back from spring break with a bad tattoo.

Dicts are at least not-unimportant for Julia. And without specializing 
syntax beyond system consonant indication, population, access and movement 
there must be some lexicographic uniqueness.  It could be limited to :Dict, 
should it? Julia knows (I do not), the more robust and healthy approach is 
to match other not-unimportant stuff that already is happily adopted and 
comfortable in use.  The most important underpinnings of the language live 
in a very intra-relating and inter-related relm.  Even there, these 
not-unimportants are mutually strengthening rather than sub-segmenting.  So 
using Dicts mellows when we know how Julia lifts semantic efficacy to 
project syntactic clarity.

There are math-y views of this, here is one:
"In general you can think of the homotopy pushout of A → B, A → C as the 
'free' thing generated by B and C with 'relations' coming from A. But it's 
important that the "relations" are imposed exactly once, since in the 
homotopical/derived setting we keep track of such things (and have 
'relations between relations' etc.)” - from Ried Barton 
<http://mathoverflow.net/questions/8684/homotopy-pullbacks-and-homotopy-pushouts>


On Wednesday, September 2, 2015 at 12:45:08 PM UTC-4, Michael Francis wrote:
>
> With the change to 0.4 happening soon I'm finding the the new Dict syntax 
> in 0.4 (removal of {}, []) is extremely verbose.
>
> I find myself interfacing with JSON APIs frequently, for example a 
> configuration dictionary :
>
> data = {
>         :displayrows => 20,
>         :cols => [
>                     { :col => "l1" },
>                     { :col => "l2" },
>                     { :col => "l3" },
>                     { :col => "num", :display => true },
>                     { :col => "sum", :display => true, :conf => { :style 
> => 1, :func => { :method => "sum", :col => "num"  } } }
>                 ]  
>        ... # Lots more   
>     }
>
> becomes -
>
> data = Dict{Symbol,Any}(
>         :displayrows => 20,
>         :cols => [
>                     Dict{Symbol,Any}( :col => "l1" ),
>                     Dict{Symbol,Any}( :col => "l2" ),
>                     Dict{Symbol,Any}( :col => "l3"   ),
>                     Dict{Symbol,Any}( :col => "num", :display => true ),
>                     Dict{Symbol,Any}( :col => "sum", :display => true, :conf 
> => Dict{Symbol,Any}( :style => 1, 
>                                                                     :func 
> => Dict{Symbol,Any}( :method => "sum", :col => "num" ) ) )
>                 ]  
>        ... # Lots more
>     )
>
> This feels like asking a person using arrays to write the following
>
> Array{Int64,2}( Vector{Int64}( 1,2,3), Vector{Int64}( 4,5,6) )
>
> vs
>
> [ [ 1, 2, 3] [ 4,5,6 ] ]
>
> Can we please reconsider ?
>
>

Reply via email to