Hi all,
On Thu, May 1, 2014 at 10:56 AM, thom lake <[email protected]> wrote:

> Agreed. Initialization continues to send me running for the REPL. For
>> example (Int)[], Array(Int,0), Array{Int,1}(). The later doesn't work,
>> but I always want to type it. I kind of like the (K=>V)[] syntax, but
>> wouldn't be sad to see it go if it meant less confusion.
>>
>> On Thursday, May 1, 2014 1:11:59 PM UTC-4, 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.
>>>
>>> Yes I would say having one syntax is the best thing to do. This would be
less confusing. More the ways of doing it more confusing the code looks.
Too many symbols like {,},(,), decrease code readability. Which is why I
prefer python syntax. its clean simple and easy to read.

> 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?
>>>>
>>>>
>

Reply via email to