Reply to Re: Code readability vs. execution time

Your name:

Reply:


Posted by Steve on 09/04/07 22:05

> if (!mostLikelyValue) {
> performSomeAction();
> }
> theRequiredAction();
>
> Where in my opinion the second one is more readable and the first one
> probably faster (?)

the one shown above is the format i like, esp. if all you do is 'break;' in
the if/else struct. as for faster...they perform the same...exactly the
same. and if you get this technical over the code, you're doomed to never
finish an application...at least on time that is.

as a rule, i stay away from if/else constructs as much as possible. well, i
don't 'stay away'...i simply think out a problem and work out its solution
in different terms than most...and i don't find myself using
if/else...generally, i just 'if' and 'switch' (but i don't do a whole run of
branching logic in those either). that's just me and it involves a whole
other approach to programming that i can't just dive right into and discuss
coherently.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация