|
Boost : |
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-02-01 18:11:38
Matthew Vogt wrote:
> christopher diggins wrote:
>>> The template-based IDL will make this stuff easier.
>>
>>
>> Agreed.
>
> Is there a non-macro-based variant of the IDL in development,
Yes, but I haven't had much time to work on it. See http://tinyurl.com/6w59y.
> <snip>
>
>>>> The names that I like:
>>>>
>>>> IEmpty
>>>> IAnything
>>>> IUnknown
>>>> INull
>
> I find all of these distrurbingly reminiscent of COM interfaces...
I intended the reminiscence but not the disturbance. :-)
>> I would rather say:
>>
>> FuBar(IAnything n) {
>> if (n.type_info() == typeid(int)) {
>> cout << extract<int>(n);
>> }
>> }
>>
>> Whatever, this is trivial stuff, I don't really care that much.
>
> I beg to differ, and I am sure many others will along with me :)
>
> My preference is for 'unknown', since you don't know anything about
> the type.
>
> FuBar(unknown obj) {
> if (target_type(obj) == typeid(int)) {
> cout << extract<int>(obj);
> }
> }
I don't really have a preference between "anything" and "unknown", but I would
have thought the former would be less disturbing. ;-)
Jonathan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk