[Prev][Next][Index][Thread]

Re: methods on make



What problem are you trying to solve ? If we assume that only one implementation
can be active at one time (a reasonable assumption) the just reloading the new
method will replace it, thus replacing an implementation.
(I am not sure fi my previous message got sent, so I may be repeating myself).

Roman

Scott Ribe wrote:

> Would a better example have been reading in a set of UI widgets from a
> stream?
>
> - Call make on the superclass of all the widgets with the stream as an
> initarg.
> - Read the tag identifying the concrete class from the stream.
> - Dispatch to the appropriate make for the concrete class, again passing
> the stream.
> - Return the actual type to the client code, which does not have to downcast.
>
> That gets rid of the nasty downcast in C++ code for this kind of thing.
> But maybe there's a better way in Dylan to address the other issues as well?
>
> Scott Ribe
> scott_ribe@killerbytes.com
> http://www.killerbytes.com/
> (303) 665-7007 voice
Warning
Could not process part with given Content-Type: text/x-vcard; charset=us-ascii; name="Roman.Budzianowski.vcf"

Follow-Ups: References: