Another idiom I wish were gone from phobos/druntime

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 4 17:09:15 PST 2015


On 2/4/15 4:50 PM, Jonathan Marler wrote:
> On Thursday, 5 February 2015 at 00:42:01 UTC, Andrei Alexandrescu wrote:
>> On 2/4/15 4:40 PM, Jonathan Marler wrote:
>>> On Thursday, 5 February 2015 at 00:35:50 UTC, bearophile wrote:
>>>> Contracts can be read by tools, and they are part of the function
>>>> signature. Contracts should be encouraged and increased, not
>>>> discouraged.
>>>>
>>>> Bye,
>>>> bearophile
>>>
>>> Not to mention that contracts can be removed by the compiler at compile
>>> time.
>>
>> Same about asserts. -- Andrei
>
> Only if the function is inlined.

Non-debug mode removes asserts statically. -- Andrei




More information about the Digitalmars-d mailing list