Put Your Commas On the Left Dink-Butt
ideonexus.com
ideonexus.com
What if you want to add a new element at the top? And even when you need to add it at the end, if you use a decent editor, it won't make a difference. For example, with vim:
(Place cursor on last element) A,<cr>myNewElement
As opposed to left comma style: o,<space>myNewElement
Only 3 extra keysrokes for both cases. (<cr> is the Enter key, by the way)
I can't believe this kind of post could make it to the front page of Hacker News.
Personally, I think it's the creative use of "Dink-butt".
Who says you have to add your elements at the end? If OP is going to be so rude and absolutist, he should really pick a stronger argument.
Does that trailing comma represent nothing (the end of the list) or an undefined/null/empty/whatever item (an extra item adding to the length of the list?
Even if the meaning is completely unambiguous as far as the language is concerned, that doesn't necessarily make it intuitive to humans especially in a mixed language scenario.
my @stuff = (
"foo",
"bar",
"baz",
);
or: my @stuff = qw(
foo
bar
baz
);
or my @stuff = qw(foo bar baz);
TIMTOWDI indeed... var a = ["stuff"
,"whatever"
,"extra"
,"more"
,"other"
,"things"
];http://webcache.googleusercontent.com/search?q=cache:http://...
Also, what a gratuitously obnoxious post. Flagged as inappropriate.
I took a really small code-formatting issue and turned it into a faux holy war using faulty logic, cherry-picked facts, and doofy ad hominem attacks in the tradition of Bloom County:
http://www.berkeleybreathed.com/pages/09bloomlibrary.asp
My post might be "gratuitously obnoxious," but your taking offense at it is amusingly pretentious.