Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost range changes [1.37.0]
From: Dave Handley (dave_at_[hidden])
Date: 2008-11-20 18:42:45


> Dave Handley skrev:
>> <snip>
>>>>
>>>> IMHO, this is obfuscated. There is a difference between an empty range
>>>> and a
>>>> range which is optional.
>>>
>>> An there is a difference betweeen an empty range and a singular range.
>>
>> If there is a genuine difference between an empty range and a singular
>> range, why is the functionality so different between debug and release?
>
> In debug mdoe we detect misused of singular ranges.
>

Unfortunately, different functionality between debug and release is almost
always a bad thing. You are no longer testing the same code in both cases,
and in this case the library will silently fail in release which would be a
disaster in production. I'm going to have to side with both Tom and Rob on
this thread and say that this is a severe retrograde step. From the
perspective of a generic programmer, this change turns boost.range from
being a really useful library, into it being close to unusable. Please
reconsider the change. I just can't agree with any of the reasons for doing
it - testing a bool in the empty or size functions will have no noticeable
difference to performance in any real world application.

Dave


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net