|
Boost : |
From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-11-23 14:32:57
In message <8vj950+r5kh_at_[hidden]>, William Kempf <sirwillard_at_my-
deja.com> writes
>> OK, so now that we've established the two sides of the fence, I
>guess we
>> can sit on either side ;-)
>
>*laughs* How about choosing neither side?
So, it's a three way fence? Any carpenters on the list?
>I can see the argument
>for it being a smart pointer (even though I think this stretches
>things a tad), but baby, it ain't no function ;).
Not at all. It is a problem of perception and overly narrow usage (and
therefore, I guess, brainwashing ;->). The problem is that most people
automatically assume that "smart pointer" means "smart object pointer",
whereas if we look at the term we discover that what we have is a
pointer (a level of indirection that supports dereferencing notation
already used for built-ins), that it's fairly smart, and that it deals
with function-like entities. So <blink/><blink/> looks like a smart
function pointer, <sniff/><sniff/> smells like one, etc!
>That's why the
>term "functor" was created.
Functor already has a number of common uses, and this is only very
imprecisely one of them. I personally consider it sufficiently remote
from the accepted meaning of functor in many C++ circles as to be
confusing. The more modern terminology based on function objects (which,
uncannily enough, are functional but are not functions) and smart
pointers is a better place to start. It has the benefit that (1) it
accurately describes intent, and (2) more closely builds on existing
terminology.
>On the other side, I never really cared for "callback" either. Not
>for the reasons you gave, but just because it implies a single useage
>that's not forced by the design (i.e. a callback is a general functor
>which need not be delayed in it's call).
OK, so how about we team up against "callback"?
>So, in the end, I'd hope we pick some as yet not suggested name. :)
And worry about the fractures in the alliance/fence later ;-)
Kevlin
____________________________________________________________
Kevlin Henney phone: +44 117 942 2990
Curbralan Limited mobile: +44 7801 073 508
mailto:kevlin_at_[hidden] fax: +44 870 052 2289
http://www.curbralan.com
____________________________________________________________
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk