Pass-by-reference : Could a C#-like approach work in Python?

Terry Reedy tjreedy at udel.edu
Fri Sep 12 11:30:44 EDT 2003


"Paul Foley" <see at below.invalid> wrote in message
news:m24qziiwvw.fsf at mycroft.actrix.gen.nz...
> Terry said "FEXPR", which tells you he's about 30 years out of date
> wrt Lisp :-)

Actually, less than 22 years (LISP was (C)ed in 1981).  I have no idea
when the last (MAC)LISP definition using FEXPR was written, if indeed
no one is still using it on a retro machine.  I'd bet less than 15
years ago.  No need to exaggerate my newly acquired (I just read the
book) and freely admitted (in the followup post) out-of-dateness;-).

Actually, I do not agree idea that acquiring new knowledge of old
things makes one 'out of date' with respect to that subject.

> Any vaguely modern Lisp has macros instead of FEXPRs.

Even back then, Winston and Horn presented MACRO as a alternate
keyword, with effects similar to, but more complex and powerful than
FEXPR.  But I believe that FEXPR is/was more like what Horne was
proposing for Python, and hence more appropriate,

But back to the semantics of 'function' calls.  In all languages I
have used, a function call meant/means one thing: evaluate the
argument expressions according to the rules of the language and pass
the results to the function body.  I believe Horne was proposing that
there be some mechanism added to function declaration syntax that
would change the usual argument handling without having to explicitly
change argument expressions.  He happened to have gotten that idea
from C#.  The point of my FEXPR-containing paragraph is that C# might
well have gotten the idea from Lisp, where it appeared decades ago.
(And hence the joke about Lispifying rather than C#ifying Python.)

Terry J. Reedy






More information about the Python-list mailing list