News for hackers. Stuff that matters.
Re:Julia v0.7.0 Release Notes by rattray on Thursday February 08, 2018 @09:04AM (#16332075)
Wow, a bunch of nice features here, named tuples, function argument destructuring... Also a bunch of syntax/parsing cleanups, hopefully for the best.
Re:Julia v0.7.0 Release Notes by karmakaze on Thursday February 08, 2018 @09:32AM (#16332214)
When I first used named tuples in Swift I thought they'd be so great, no more _1 _2 or whatever. After using them a while, it gets a bit tiring and litters with repeated type info. A type alias for a named tuple would help with that. Any others have similar experiences? Or would they play out differently in Julia?
Re:Julia v0.7.0 Release Notes by AboutTheWhisles on Thursday February 08, 2018 @09:46AM (#16332302)
Wouldn't that just be a struct?
Re:Julia v0.7.0 Release Notes by karmakaze on Thursday February 08, 2018 @02:45PM (#16334985)
Like an ad-hoc anonymously typed struct. Only the members are named, so each time the type is specified it is with the member names, hence just using a type name is preferred. If it is really just used at one or two call sites and not propagated all is well, but invariably things tend to expand in use.
Re:Julia v0.7.0 Release Notes by wallnuss on Thursday February 08, 2018 @05:08PM (#16336038)
I still don't quite see why you wouldn't just use a named struct, but you can create a alias for the NamedTuple type

    const MyAlias = NamedTuple{(:a, :b),Tuple{Int64,Int64}}
    MyAlias((2, 3)) # (a = 2, b = 3)
Re:Julia v0.7.0 Release Notes by dnautics on Thursday February 08, 2018 @09:46AM (#16332295)
Types are first class in Julia.