Phrogz wrote:
> Coming to Ruby from JavaScript (among other paths) I personally dislike
> Ruby's two-character Hash delimiter. It's been brought up before, and I
> know that the colon makes it harder to parse with symbols, but I wish
> we had a one-char (preferably without shift on an English keyboard
> layout) hash delimiter.
> 
> hash = [ foo:bar, whee~la, dunno|what, delimiter=wouldbe ]
> 
> Heck, even two no-shift chars would be a nice improvement:
> 
> hash = [ foo--bar, jim..jam ]
> 
> ...but now I'm hijacking the thread.

Hijack away, it's been discussed to death for years.

I agree I'd prefer a "nicer" notation than we have, but the
one we have is still better than nothing.

I'd like the single colon personally; or even the double colon,
but that already has a meaning.

As for symbols, I'd just require a space (which seems reasonable
to me):

    hash = {123 : :abc, 234 : :def}

or even

    hash = {123: :abc, 234: :def}

It looks a little funny, but at least it doesn't have commas
intruding between the key and value.


Hal