On 2017-12-30 23:22, Gregory Ewing wrote:
Stefan Ram wrote:
BASIC has
DEF FN...
which /can/ define actual subroutines, limited to expressions.
Now, what does this limitation remind me of?
The equivalent limitation in Python is nowhere near as bad,
since if you outgrow what lambda can do you can always
use a def instead. BASIC didn't have that option (unless
you were using one of the more advanced dialects, such
as BBC BASIC, which had a PROC statement).
PROC wasn't really a statement, but a prefix for a procedure name. There
was also another prefix, FN, for functions.
DEF PROChello
print "Hello world!"
ENDPROC
DEF FNsquare(x)
= x * x
They even had LOCAL variables and parameter lists. The Acorn Archimedes
range had an improved version of BBC BASIC.
--
https://mail.python.org/mailman/listinfo/python-list