Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2006-07-05 14:56:12


Sohail Somani wrote:
>> -----Original Message-----
>> From: boost-bounces_at_[hidden]
>> [mailto:boost-bounces_at_[hidden]] On Behalf Of Dean
>> Michael Berris
>> Sent: Wednesday, July 05, 2006 11:07 AM
>> To: boost_at_[hidden]
>> Subject: Re: [boost] Exception lib?
>>
>> It's probably a personal issue against the use of dynamic_cast<> or
>> static_cast<> and even const_cast<> because IMHO it makes code
>> terribly un-readable and even seem "hackish". It's my personal
>> opinion that whenever you need to resort to casting in client code,
>> then that means the design of the solution isn't as elegant or as
>> well thought out as it could be.
>
> Not to mention that the client can and will do it wrong.

I don't want to make a huge deal out of this because ultimately I don't mind
hiding the dynamic_cast in a function get_exception_info. But I am arguing
that this abstraction is not necessary because the only implementation
possible is through a dynamic_cast (at least I can't think of another
possibility).

--Emil


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