Boost logo

Boost :

Subject: Re: [boost] Formal Review Request: TypeErasure
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2012-05-29 11:57:37


Dave Abrahams wrote:
>> Steven Watanabe wrote:
>>
>>> I'd like to request a formal review of the TypeErasure library that I've posted about several times before here.
>>>The TypeErasure library is a generalization of boost::any and
>>boost::function. It allows easy composition of arbitrary type erased
>>operators.
>>
>> It seems the library is a little more than that. Have you considered
>> naming it Boost.DuckTyping? I think TypeErasure doesn't really
>> capture the full scope of what you've done.

>IMO DuckTyping is an ill-defined term that is sometimes used to hide a multitude of sins.

Yes, after making that post I thought about it a little more and decided I don't know how to define duck typing, but I know it when I see it.

If it walks like a duck and it talks like a duck, then it's a duck. Until it doesn't talk like a duck, then it's a run time error. That's not a language feature we want, and it's not what the library implements.

Primarily it seems the library is adding a layer of type checking on top of type erasure. Boost.Any does type erasure. This library does more. I'd like the combination of static polymorphism and type erasure to have a name. ConceptAny, DynamicConcepts, AnnonymousConcepts, TypeSafeAny.

Regards,
Luke


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk