Re: Definitions
From: Zix (zix6_at_yahoo.com)
Date: 10/20/03
- Next message: Jacob Atzen: "Re: Basic books on OOA&D"
- Previous message: Thomas Gagné: "Alan Kay: The Early History of Smalltalk"
- In reply to: rackri: "Definitions"
- Next in thread: rackri: "Re: Definitions"
- Reply: rackri: "Re: Definitions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Oct 2003 09:08:15 -0700
rackri@yahoo.it (rackri) wrote in message news:<7a2f224b.0310190050.39f26b50@posting.google.com>...
> Hi all,
>
> can you please help me to understand these concepts:
>
> - delegation
> - forwarding
> - indirection
> - redirection
> - double-dispatch
>
> Thanks -- Roberto
let's tackle a couple of these:
delegation: is a design time tradeoff between inheritance from or
"delegating" the desired functionality to another class. In building
a car object, you would delegate the braking functionality to a brake
object rather than inheriting off a brake class.
forwarding: not too sure about this one, but I take it to mean serving
as an intermediary between objects where the calls to an object get
routed or "forwarded" to another object. A Proxy (Design
Patterns,Gamma,etal) eventually "forwards" calls to the object that it
is stanging in for.
indirection: is a low level programming construct in which a storage
location, instead of holding a value, contains an address to another
location where the value is stored.
redirection: not really sure about this one, but in C++/C you can
redirect things like ostreams to stdout, stderr, files,etc. So I
would say that redirection is the ability to re-route information
to/from a source/sink.
double-dispatch: Alexandrescu defines (mulimethods/multiple dispatch)
as the ability to dispatch a function call based on the dynamic types
of multiple objects involved in the call (Modern C++ Design,
pp,263-264). 2 objects gives you double dispatch. The distinction
between types can be made either at compile or run-time.
oops, I tackled all of these, this sort of smells as a homework
problem (note to OP, let us see your take on these, you'll get a
better response), but I'm interested as to what others have to say.
- Next message: Jacob Atzen: "Re: Basic books on OOA&D"
- Previous message: Thomas Gagné: "Alan Kay: The Early History of Smalltalk"
- In reply to: rackri: "Definitions"
- Next in thread: rackri: "Re: Definitions"
- Reply: rackri: "Re: Definitions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|