Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Build your array with pushby radiantmatrix (Parson) |
on Feb 01, 2006 at 16:35 UTC ( [id://527103]=note: print w/replies, xml ) | Need Help?? |
I use the former idiom as well, but I've run across this style a couple of times, too:
The one time I had the chance to actually ask a coder about that style, he gave me two rationales. First, he liked it because of a string-cat convention that's similar:
In print statements, this coder often mirrored that convention using commas instead of periods to pass the list of strings to print. (This is apparently faster, though it smacks of premature optimization to me. But I digress.) The second reason was that he found the trailing comma to be confusing; by moving commas to the front, he provided a visual reminder to put the comma in when adding to the list but without the "confusing" trailing comma. To each their own, I guess. Anyone have thoughts on this style? Just curious as to what advantages/disadvantages there might be.
<-radiant.matrix->
A collection of thoughts and links from the minds of geeks The Code that can be seen is not the true Code I haven't found a problem yet that can't be solved by a well-placed trebuchet
In Section
Meditations
|
|