Parenthesis
Dawid Ciężarkiewicz
dawid.ciezarkiewicz at asn.pl
Fri Dec 22 13:57:58 PST 2006
Kristian Kilpi wrote:
> On Fri, 22 Dec 2006 19:08:31 +0200, Gregor Richards <Richards at codu.org>
> wrote:
>
>> NN wrote:
>>> What about removing unuseful parenthesis in 'if', 'for', 'while' ?
NEVA! :)
> I did some testing. I use a scandinavian keyboard: 'Shift + 8' -> '(' and
> 'Shift + 9' -> ')'. I wrote "if a == 1" ten times, and then "if(a == 1)"
> (without the quotation marks):
>
> "if a == 1" : 21 secs.
> "if(a == 1)" : 29 secs.
>
> (The starting and stopping of my timer took some time.) So, "if a == 1" is
> 28% faster than "if(a == 1)"...
Good code is written once and read for years.
More information about the Digitalmars-d
mailing list