Origin of the term "first-class object"
newsgroups at jhrothjr.com
Tue Nov 18 21:55:44 CET 2003
"Rainer Deyke" <rainerd at eldwood.com> wrote in message
news:jYfub.229477$Tr4.681061 at attbi_s03...
> John Roth wrote:
> > I think I'd disagree with that. In fact, except for the optimization
> > within function bodies, I can't think of anything I can't do
> > with a name that I might want to.
> I can think of several things. One would be passing a name as an argument
> to a function.
Given your example below, I *think* you're asking to be able
to pass a *something* that allows you to bind an object to an
identifier in another object. I don't think it would be particularly
difficult to create an object that could do this, but I'd really
have to be convinced as to why there isn't any simpler way to
accomplish the (unstated) end result, especially since the potential
for very hard to diagnose coupling and side effects is horrendous.
> Given the immutability of certain Python objects, it is
> often necessary to write statements in the form of
> "x = f(x)". This is a violation of the Once And Only Once principles,
> it mentions the same variable twice.
That's a very weak reason.
> Rainer Deyke - rainerd at eldwood.com - http://eldwood.com
More information about the Python-list