steve+comp.lang.python at pearwood.info
Mon Feb 25 02:06:33 CET 2013
On Sun, 24 Feb 2013 11:40:05 -0800, piterrr.dolinski wrote:
>> > if (some statement): # short form
>> > rather than
>> > if (some statement == true): # long form
>> What all those ugly brackets are for?
> Back in the day when C was king, or take many newer long established
> languages (C#, Java),
Python is older than either C# or Java. Why have those languages paid no
attention to the innovations of Python, instead of copying the
misfeatures of C?
Pascal and Algol and Fortran are older than C. Why did C introduce
unnecessary brackets when these older languages did not need them?
> the use of () has been widespread and mandated by
> the compilers. I have never heard anyone moan about the requirement to
> use parentheses.
You have not been paying attention.
In many ways, C has been a curse on programming. It has trained large
numbers of coders to expect and *demand* poor syntax.
> 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?
That's funny. Perhaps you should be programming in Lisp.
> I could understand someone's reluctance to use parens if they are very
> new to programming and Pythons is their first language. But my
> impression here is that most group contributors are long-time
> programmers and have long used () where they are required. Again, I'm
> really surprised the community as a whole ignores the programming
> "heritage" and dumps the parens in a heartbeat.
(Because they are unnecessary) (visual noise) (that don't add anything)
(useful) (to the reader's understanding) (of the code).
More information about the Python-list