[Python-ideas] Making colons optional?

Bruce Leban bruce at leapyear.org
Fri Feb 6 18:57:35 CET 2009


Riobard Zhan writes:

 > It is pretty clear that colon-supporters do not pay attention to the
 > inconsistency of semicolons being optional and colons being mandatory
 > that I mentioned

So what? Commas are also mandatory. They look like semicolons so we should
make them optional too. Am I joking? Sure but look at this syntax:

   f(1 2 3 a=4 b=5 c=6)

I can figure out where each parameter ends easily enough without the commas
[because my implicit multiplication proposal was rejected :-(]. Sure some
people will quibble that

   f(1 -2)

is a problem and so on but that can be fixed just as C distinguishes between
x =- y and x = -y.** That's not the real problem. The real problem is that
we *want* those commas to break up the flow of text. In English, a comma is
a pause in the reading. If you, stick extra, commas in, your sentences you
will, confuse people. Colons, semicolons, dashes, etc. all server similar
purposes to cue the reader in on what the sentences is about? Hah, tricked
you there with that question mark.

Enough of this for me. Consistency for consistency's sake is overrated.
Let's get on to important stuff like whether we number the bits from the
right end or left end of the number and whether array indexes should start
at 1 or 0.

--- Bruce

P.S. Colons are redundant by their very nature that they use two dots when
one is all you need (or love is all you need (or something like that)).

** For the historically challenged, original C used =- instead of -=.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20090206/15e835b5/attachment.html>


More information about the Python-ideas mailing list