On Mon, 2002-02-11 at 16:53, M. Mueller (bhu5nji) wrote:
> So that's what a functor is.  Function adapter is a better name - by far.

I agree.  I think the name functor comes from something in higher
mathematics, so if you're familiar with that it works ok.  For those
of us who are mere mortals, however... :-)
 
> Function is an address and method is an offset from the base of the table?

Exactly!  To call a method you actually need two addresses: that of the
class, and that of the method inside the class (i.e. table base offset).
Functions only require one.  That's why you can get into trouble
trying to pass a non-static method.  (BTW, static methods are the same
for each class, so they're implemented exactly like a regular function.
That's why you can substitute a static method for a regular function.)
 
> I am truly amazed how the containers in STL have so rapidly changed that way 
> I approach design.   I've OO-ing things in my product (www.signalnetware.com) 
> since last summer and I've had some handsome payoffs for the work.  I can 
> sense their is more value to be had.  I really got frustrated with the 
> for_each algorithm, though.
> 

Well, I personally don't consider containers an example of OO.  Instead,
I consider them an example of generic programming, but hopefully the
result is the same: better code and maintainance.

Tanner
-- 
Tanner Lovelace | [EMAIL PROTECTED] | http://wtl.wayfarer.org/
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
GPG Fingerprint = A66C 8660 924F 5F8C 71DA  BDD0 CE09 4F8E DE76 39D4
GPG Key can be found at http://wtl.wayfarer.org/lovelace.gpg.asc
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
 Those who are willing to sacrifice essential liberties for a little 
 order, will lose both and deserve neither.  --  Benjamin Franklin 

 History teaches that grave threats to liberty often come in times
 of urgency, when constitutional rights seem too extravagant to 
 endure.  --  Justice Thurgood Marshall, 1989 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to