Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.
ldo at geek-central.gen.new_zealand
Tue Feb 23 00:00:48 CET 2010
In message <1ecc71bf-54ab-45e6-a38a-d1861f0921d3 at v25g2000yqk.googlegroups.com>, sjdevnull at yahoo.com wrote:
> On Feb 20, 1:30 am, Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:
>> In message <op.u8at0suda8ncjz at gnudebst>, Rhodri James wrote:
>> > In classic Pascal, a procedure was distinct from a function in that it
>> > had no return value. The concept doesn't really apply in Python; there
>> > are no procedures in that sense, since if a function terminates without
>> > supplying an explicit return value it returns None.
>> If Python doesn’t distinguish between procedures and functions, why
>> should it distinguish between statements and expressions?
> Because the latter are different in Python (and in Ruby, and in most
> modern languages), while the former aren't distinguished in Python or
> Ruby or most modern languages? Primarily functional languages are the
> main exception, but other than them it's pretty uncommon to find any
> modern language that does distinguish procedures and functions, or one
> that doesn't distinguished statements and expressions.
> You can certainly find exceptions, but distinguishing statements and
> expressions is absolutely commonplace in modern languages, and
> distinguishing functions and procedures is in the minority.
So they are worth distinguishing where they are distinguished, except where
More information about the Python-list