[Biococoa-dev] why placeholder classes was: BCSequence class cluster
Koen van der Drift
kvddrift at earthlink.net
Sun Jan 9 01:03:18 EST 2005
On Jan 9, 2005, at 12:51 AM, Charles PARNOT wrote:
>> On Jan 8, 2005, at 8:20 AM, Alexander Griekspoor wrote:
>>>> Again, the reason why I came up with the idea of some public
>>>> headers for placeholder classes for typed sequences was to propose
>>>> the user BOTH OPTIONS! (but maybe we should not).
>>> That's perhaps the most important question we have to answer first
>> I still don't understand the construction with these placeholder
>> classes. Why do we need them, next to the subclasses we already have?
>> (this is an educational question, not a critical one ;-)
>> - Koen.
> This only applies to the class cluster design. Because the public
> superclass declares all the methods as valid, then all the subclasses
> are known by the compiler to also respond to all the methods.
> So we can't just use the headers of the subclass. We have to provide
> separate headers with a restricted set of methods.
Why a restricted set f headers?
> But alloc-ing these objects will actually return objects of the class
> cluster (hence 'placeholder' classes). The compiler is fooled. The
> runtime gets what is needed.
> I hope the shortness makes it clearer. I can make a longer version if
> you want ;-)
Please do, because it is still very confusing to me.
More information about the Biococoa-dev