![]() |
which pattern is better and why?
[HTML]
Pattern A: ---------- funciton bob() { if(penis=>999) { block } else { block } } Pattern B: ---------- funciton bob(){ if(penis=>999){ block } else { block } } [/HTML] |
B
its more compact... |
A is probably easier for a third party to read and understand but B is how I format my own code.
SpaceAce |
I usually go for A - somehow with B, the starting brace is often missed.
A also lends itself to cutting and pasting blocks (omitting the conditional logic). :2 cents: -Dino |
I'm used to B.
A is easier to line up braces for someone else reading it. |
Quote:
why? |
i just don't understand why all the programers I asked say they use B and at the same time say A is better in most of the ways :Oh crap
|
Quote:
A = I know a guy. He has a penis > 999. I think I will cock block him. He has it coming. B = I know a guy with a penis that's at least 999. I'm going to cock block him. SpaceAce |
I vote for C :)
|
Quote:
|
neither
its function not funciton you dyslexic slob |
I prefer A
|
Quote:
|
Quote:
i was kidding anyway |
A is more professional. Code needs to be easily readable.
|
Penis malfunction debugging error....wtf !!!
|
Quote:
code needs to be readable and editable, yet short |
A is much easier to go into and read but i prefer B
|
Quote:
|
bumpppppp
|
I use B, but you can't really say which one is the best. It is down to personal preference. Each programmer has their own unique coding style, like designers has their ways..
|
All times are GMT -7. The time now is 10:25 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123