Yes, Iād say Dicts (AKA associative arrays) need to absolutely be a first
class data structure in Julia, with appropriate easy to understand and use
syntax.
This seems like a huge step backwards, already the ā=>ā syntax makes it a
lot clumsier than in most other popular modern languages.
Scott
I have to admit i didn't follow this discussion although i'm a big fan of
structuring data into Dicts.
I still understood http://julialang.org/blog/2012/02/why-we-created-julia/
as somehow setting the tone for Julia as a language. And i find
> We want something as usable for general programm
Easy now!
If you want to know what is going on with the design of Julia and why
certain decisions are made then you need to follow the development on
github. As a first stop, the NEWS.md file is your friend:
https://github.com/JuliaLang/julia/blob/master/NEWS.md which has some
details on this.
T
Yeah, like a toll-gate has been introduced and we're not sure what the tax
is being spent on :)
On Thu, Sep 3, 2015 at 2:39 AM, Marcio Sales
wrote:
> Made me remember the Mayor's decisions for new infrastructure in my city.
> "Just why?" :)
>
Made me remember the Mayor's decisions for new infrastructure in my city. "Just
why?" :)
The amount we can re-use old syntax for new purposes is limited: we need one
release in which the old syntax generates a warning, and then the new meaning
can arrive in the next release. Otherwise, code that worked on 0.3 might
exhibit surprising failures in the cases where the new meaning doesn
On Wednesday, September 2, 2015 at 11:21:35 AM UTC-7, Erik Schnetter wrote:
>
> If I recall correctly, the two sets of ASCII bracketing operators ([] and
> {}) were deemed to be more usefully employed for arrays;
>
How has have the curly braces "{" and "}" been reused for arrays in 0.4?
Curly
If I recall correctly, the two sets of ASCII bracketing operators ([] and
{}) were deemed to be more usefully employed for arrays; apparently, arrays
are used more often than dictionaries in Julia. However, I also recall the
suggestion that some other kind of bracketing operators -- maybe non-ASCII
The arguments given in the thread that Dict 'isn't special' should also
also apply to Vector and Array, I presume nobody wants to do away with
literal syntax for them as well?
There are many times when having a simple terse native (code editor aware)
literal syntax for structured data is ver
This issue was raised here:
https://github.com/JuliaLang/julia/issues/6739#issuecomment-120149597
I believe the consensus was that nice JSON input syntax could be handled
with a macro.
Also, once the "[ a=>b, ...]" syntax deprecation goes away, I believe this:
[ :col => "l1", :col => "l2", .
Why not just Dict(:col => "l1")?
--Tim
On Wednesday, September 02, 2015 04:55:17 PM Mike Innes wrote:
> You might consider creating an alias, e.g.
>
> d(xs...) = Dict{Any, Any}(xs...)
>
> d(:a=>1, :b=>2)
>
> It's not as nice, but it's not awful either. You could also do
>
> macro d(xs...)
>
would
appreciate the link.
Thanks,
David
From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On
Behalf Of Mike Innes
Sent: Wednesday, September 2, 2015 9:55 AM
To: julia-users
Subject: Re: [julia-users] The new Dict syntax in 0.4 is very verbose
You might consider
You might consider creating an alias, e.g.
d(xs...) = Dict{Any, Any}(xs...)
d(:a=>1, :b=>2)
It's not as nice, but it's not awful either. You could also do
macro d(xs...)
for x in xs
@assert x.head == :(=>)
isa(x.args[1], Symbol) && (x.args[1] = Expr(:quote, x.args[1]))
end
:(Dict{
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 => [
{
14 matches
Mail list logo