Stroustrup objects to adding Contracts to C++

Paolo Invernizzi paolo.invernizzi at gmail.com
Wed Nov 11 13:09:03 UTC 2026


On Wednesday, 11 November 2026 at 12:37:58 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
> On 11/11/2026 10:29 PM, Paolo Invernizzi wrote:
>> On Wednesday, 11 November 2026 at 01:12:03 UTC, Richard 
>> (Rikki) Andrew Cattermole wrote:
>>> On 11/11/2026 12:04 PM, Walter Bright wrote:
>>>> On 11/10/2026 2:06 PM, monkyyy wrote:
>>>>> There are huge gaps in my knowledge of the parts of d I 
>>>>> will never touch and I feel like Im the near the only 
>>>>> person who understands the behavior of some edge case of 
>>>>> template magic
>>>>>
>>>>> throwing stones in glass houses?
>>>>
>>>> I hear you. There are many features in D that have turned 
>>>> out to be not very useful. They need to be discarded, which 
>>>> is why we are doing editions.
>>>>
>>>> A language with a small number of powerful features is 
>>>> better than having a large number of weak features.
>>>
>>> I.e. @nogc pure
>> 
>> @nogc is actually used in our codebase, it's not a weak 
>> feature.
>> 
>> /P
>
> I can always tell when people don't read and understand my 
> posts ;)
>
> Effects analysis in dmd is DOA in the type system.
>
> It cannot do it correctly.
>
> Walter screwed up designing the architecture for dmd's semantic 
> analysis when he designed it to be fast and not for analysis 
> capabilities.
>
> See: attribute soup. Without inference working correctly, this 
> problem cannot be fixed, and we can't fix it.

Fair enough, I was answering about the feature, not about how dmd 
implements it.

What we rely on is the guarantee, a compile-time check that a hot 
path does not allocate. We live with the attribute soup for that, 
also because Claude takes care of that.

What gives us the same guarantee in an edition without @nogc?

/P




More information about the Digitalmars-d mailing list