Boost logo

Boost :

Subject: Re: [boost] Conversion review
From: Ralph Tandetzky (ralph.tandetzky_at_[hidden])
Date: 2011-08-23 14:02:00


Am 23.08.2011 18:56, schrieb Vicente J. Botet Escriba:
>> I don't like implicit conversions in the first place. This hasn't
>> anything to do with the library itself. But providing implicit
>> conversions can create temporary objects or make a program behave
>> weird in the strangest places. Sometimes versions of overloaded
>> functions are called, you wouldn't expect. Some stuff compiles, where
>> you would rather have a compile time error than a runtime crash. I
>> try to avoid implicit conversions and prefer handwritten conversion
>> where neccessary. This way you will always know what's happening in
>> your code. Therefore the library would not be of great use for me.
>> I'm not against implicit conversions per se, but from my experience
>> they should be used with great care. Using this library might suggest
>> the opposite to the unexperienced user.
> * What is your evaluation of the potential usefulness of the library?
> The library provides implicit and explicit conversions, and as you
> have surely remarqued you need to use an explicit function to get them
> (implicitly), so the conversion is not realy implicit. No risk for the
> unexperienced user as it need to state explicitly that he want
> implicit conversion ;-)
Sorry, my fault. I didn't look into deeply enough.

Best regards,
Ralph.


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