[RFC] Coding guidelines - Comma on left

These RFCs were either rejected or have been replaced by an alternative proposal. They will not be included in phpBB.
drathbun
Registered User
Posts: 72
Joined: Wed Feb 15, 2006 6:40 pm
Location: Texas
Contact:

Re: [RFC|Accepted] Coding Guideline Modifications

Post by drathbun »

brunoais wrote:What happens if it's the 1st thing in the list that is removed and not the last one or one in the middle? We get to the same story, don't we? Comma on the left is better for adding, comma on the right is better for removing.
Removing is far more rare than adding. In my code, the first column in a SQL select (as an example) is always a primary key such as post_id, user_id, topic_id, and so on. Those would never be removed. It is (in my opinion) far more likely that code will be added than removed as edits are done. Even if edits are done during debugging / testing via commenting out code I would never remove the primary key reference.
callumacrae wrote:It looks horrific.
Many have said this, and I get it. :) I thought so too the first time I saw it. If you try it you may find you like it. Either way, appearance is only one factor, and I subject the coding advantages outweigh the stylistic concerns. As my opinion, of course. ;)
Sometimes you're the windshield, sometimes you're the bug.

Post Reply