assert semantic change proposal
Daniel Gibson via Digitalmars-d
digitalmars-d at puremagic.com
Sun Aug 3 15:47:35 PDT 2014
Am 04.08.2014 00:45, schrieb Dmitry Olshansky:
> 04-Aug-2014 02:35, Daniel Gibson пишет:
>> Am 04.08.2014 00:15, schrieb Andrei Alexandrescu:
>>>
>>> That said, should we proceed carefully about realizing this advantage?
>>> Of course; that's a given. But I think it's very important to fully
>>> understand the advantages of gaining an edge over the competition.
>>>
>>
>> Gaining an edge over the competition?
>>
>> "A new DMD release broke my code in a totally unexpected way and people
>> tell me it's because I'm using assert() wrong.
>> I've been using it like this in C/C++/Java/Python and D since forever
>> and *now*, after >10years, they changed D's meaning of assert() to
>> somehow imply assume() and optimize my safety-checks away.. they pretend
>> it was always planned like this but they never got around to tell anyone
>> until recently.
>> It took me a week to find this freaking bug!"
>
> Wait a sec - it's not any better even today, it already strips them
> away. So unless debugging "-release -O -inline" programs is considered a
> norm nothing changes.
>
It strips them away, but it doesn't eliminate other code based on the
(removed) assertion. See my other post for an example.
More information about the Digitalmars-d
mailing list