Terry Reedy wrote:
Joe Strout wrote:
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 )

How would you differentiate

f 'abc' + 'def'
as
f('abc') + 'def'
versus
f('abc' + 'def')

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

LogError('walk', Time) # versus
LogError('walk'), Time

Perhaps RB does not have tuple literals.

Parentheses wouldn't be required if it's a procedure call (I'm not sure about a function that's called as a procedure) or if there are no parameters to pass. Thus:

    f 'abc' + 'def'

does:

    f('abc' + 'def')
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to