in reply to Re^33: Why? (each...)
in thread Why? (each...)
So if someone is not sure which one to use they could think "[]=array, {}=hash, and ()=list, and I'm assigning it a list of key/value pairs, so I guess I should use parensYeah, except they will be thinking, "ah, I'm assigning to an array, so I must use []". It's a really bad meme, because all three are actually wrong. [] doesn't create arrays, it creates (in the right context) references. Same with {}.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^35: Why? (each...)
by Argel (Prior) on May 21, 2011 at 01:06 UTC | |
by chromatic (Archbishop) on May 21, 2011 at 06:17 UTC | |
by Argel (Prior) on May 23, 2011 at 22:41 UTC | |
by chromatic (Archbishop) on May 24, 2011 at 00:24 UTC | |
by ikegami (Patriarch) on May 21, 2011 at 01:19 UTC | |
by Argel (Prior) on May 23, 2011 at 22:52 UTC | |
by ikegami (Patriarch) on May 24, 2011 at 00:27 UTC |