Associative Array Initalizers - Possible Syntax?

cracki christoph.rackwitz at gmail.com
Mon Feb 12 17:14:02 PST 2007


Kirk McDonald Wrote:
> I do not find this a compelling reason to require brackets or 
> parentheses in all cases. I do like Nicolai's suggestion, though. (It's 
> very much like Python's syntax, and I believe has been suggested before.)


I agree. Requiring brackets makes not much sense. This is not lisp. We have operator precedence and we can make use of it. And if that fails, use parens. No big deal.

I also prefer the "[...]" style to the python/ruby/JSON "{...}" style. It's consistent with nromal array literals and spares the curlies from getting overloaded yet another time.



More information about the Digitalmars-d mailing list