But then it's unclear if (A,(B,C))[] is Dict{A,Dict{B,C}} or Dict{A,(B,C)}.-Mike On Fri, May 2, 2014 at 11:26 AM, Stefan Karpinski <[email protected]> wrote: > Yeah, that I've got nothing for unless we did this: > > (K,V)[ k => f(v) for (k,v) in d ] > > > On Fri, May 2, 2014 at 9:35 AM, Carlo Baldassi <[email protected]> > wrote: >> >> But what's your suggestion about typed dict comprehensions? >> >> >> On Thursday, May 1, 2014 7:11:59 PM UTC+2, Stefan Karpinski wrote: >>> >>> Is be more in favor of deprecating the (K=>V)[k=>v] syntax and just using >>> keyword args like this Dict{K,V}(k=v). Having so many syntaxes for this is >>> confusing and it's not like the (K=>V)[k=>v] syntax is a thing of beauty. >>> >>> On May 1, 2014, at 12:50 PM, Jameson Nash <[email protected]> wrote: >>> >>> The => is special here for the parser. What you want is >>> (Int=>Dict{Int, Int})[ ] >>> >>> However, it's possible your alternative syntax could be made to work. >>> >>> On Thursday, May 1, 2014, thom lake <[email protected]> wrote: >>>> >>>> Both of these work >>>> >>>> julia> Dict{Int,Int}() >>>> Dict{Int64,Int64}() >>>> >>>> julia> (Int=>Int)[] >>>> Dict{Int64,Int64}() >>>> >>>> So does this >>>> >>>> julia> Dict{Int,Dict{Int,Int}}() >>>> Dict{Int64,Dict{Int64,Int64}}() >>>> >>>> This doesn't >>>> >>>> julia> (Int=>(Int=>Int))[] >>>> ERROR: unsupported or misplaced expression => >>>> >>>> Any particular reason? Am I doing something silly? >>>> >
