On Sun, 24 Feb 2013 20:40:05 +0100, <piterrr.dolin...@gmail.com> wrote:

> if (some statement):               # short form
>
> rather than
>
> if (some statement == true):       # long form


What all those ugly brackets are for?


Mark,

Back in the day when C was king, or take many newer long established languages (C#, Java), the use of () has been widespread and mandated by the compilers. I have never heard anyone moan about the requirement to use parentheses.

You've never heard me then. I ... "strongly dislike" having to parse visual elements which I consider superfluous and implicit.

Does the English language have a proverb like "not being able to see the forest for the trees"?

To me, a C source looks like all brackets. Can't see the code for all the brackets.


Now come Python in which parens are optional, and all of a sudden they are considered bad and apparently widely abandoned. Do you really not see that code with parens is much more pleasing visually?

I guess one can get just as religious about the brackets as one can about the whitespace.


        if ( condition ) { action }
vs
        if condition: action


In time estimated, I'd say I can read and understand Python code about 20% faster than any of these brackety languages, even compared to languages I worked a with couple of years longer. That's a lot of effort saved.



Michael
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to