Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.

Lie Ryan lie.1296 at gmail.com
Sat Feb 20 02:16:02 EST 2010


On 02/20/10 17:30, Lawrence D'Oliveiro 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?

There are non-trivial languages that have been made without procedures
and statements and non-trivial programs written on those languages.
There is technically no need for a lambda that supports statements;
someone could simply write a full-blown Monad framework and all of the
things required for IO Monad and all their syntax sugars up to near a
level of Haskell. Then we can do away with 'def's and all the statements
or make them syntax sugar for the Monads.

Now, why don't we start a PEP to make python a fully-functional language
then?



More information about the Python-list mailing list