I'm not down with the new(er) Ruby hash syntax. I'm not down.
In javascript, I can do this:
hash = {
first : "one"
second : "two"
third : "three"
}
In Ruby, I can do this,
hash = {
rocky: "one"
mountain: "two"
roads: "three"
}
or I can do this:
hash = {
:smooth => "one"
:vanilla => "two"
:days => "three"
}
The advantages of the second method are fairly clear. Smooth vanilla days.
The hash rocket syntax isn't deprecated, as detailed in this SO answer, and I don't think the new(er) syntax is "nicer" in the case of defining hashes (it is totally great for named params, though). We can use both, and I intend to use both. I know Michael will still make fun of me, but I feel pretty OK with this.
Still! What I'm saying is, when I use
:tab /:
in Javascript, I get nicely columnized hash definitions. If I use the same command in Ruby, I get a syntax error. I totally prefer hash rockets for hash definitions. (I have corrected my examples above).