Origin of the term "first-class object"

John Roth newsgroups at jhrothjr.com
Tue Nov 18 07:41:57 EST 2003


"Ben Finney" <bignose-hates-spam at and-benfinney-does-too.id.au> wrote in
message news:slrnbrjijj.105.bignose-hates-spam at rose.localdomain.fake...
>
> > This is a violation of the Once And Only Once principles, since it
> > mentions the same variable twice.
>
> I've never heard of that principle.

Different authors give it different names. Dave Thomas and
Mike Hunt (the Pragmatic Programmers) call it "DRY":
"Don't repeat yourself." Once and only once comes, I believe,
from XP. There are other names.

The essential concept is that there should only be one
location for something in a system. Complaining about
x = f(x) is, IMO, being excessively anal about it.

John Roth






More information about the Python-list mailing list