Aaron Brady wrote:

I think it would be a good step if you could make some sensible
interpretation of a typical statement without its parentheses.

f "abc" 123
-->
f( "abc", 123 )

It would be just the thing in a couple of situations...

Such a language is possible -- take a look at REALbasic sometime. RB certainly has its problems (mainly bugs), but the language syntax is beautiful. To your point, parentheses are not required around any method call that (1) has no return value, or (2) requires no parameters. Example:

 LogError "Walk has gotten too silly", CurrentTime

Here, LogError is a method call that takes two arguments, and CurrentTime is a method call that takes none.

Your "f" example above works fine in RB too, though with such an abstract example it's a little hard to see why it's so cool.

Eliminating unnecessary parentheses does a lot to improve the readability of the code IMHO.

Cheers,
- Joe

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

Reply via email to