Quote:
Originally Posted by cbk1994
For the thread to be stuck pretty much says it is the "correct" way to do things. A few points:
- Variable declarations serve absolutely no purpose to the engine, and can't possibly have any other effect except slowing it down, even if ever so slightly. Saying that all variables should be declared before being initialized is incorrect and personal preference. It is probably better to just use comments for listing variables.
|
Most things mentioned in style guides serve no purpose in the engine and are personal preference. The idea is to point out what most people's personal preference is, or should be.
Quote:
- The indentation of your switch statement is wacky.
|
That is how pretty much everybody indents switch statements.
Quote:
There are also some things that need further explanation, such as the return statement. The way it's worded now it could be seen that something like:
PHP Code:
return (((a ^ 2) + (b ^ 2)) ^ .5);
is wrong, when it's clearly not.
|
It clearly says "should", it is not ambiguous.