UserLinux chooses Python as "interpretive language" of choice
Terry Reedy
tjreedy at udel.edu
Sun Dec 21 20:30:36 CET 2003
"John Roth" <newsgroups at jhrothjr.com> wrote in
message news:vub584opb8sd0f at news.supernews.com...
> Well, the basic idea was simply to make the ()
optional for functions
> with no parameters.
In mathematics (except in lambda calculus), there
is generally no such thing since functions
generally have no side effects and hence no-param
function = constant, and name with no parens is
same as normal name ref to constant, whether
number, function, or other mathematical object.
On the other hand, one-param functions *are* ofter
written without parens for simple args. Hence I
suspect that above would lead to the suggestion
that parens also be optional for single-arg funcs.
The overloading of no-op juxtaposition to mean
either * or () (alternatively, the interpretation
of function * number as function(number)) is
rather cute.
Terry J. Reedy
More information about the Python-list
mailing list