Stroustrup objects to adding Contracts to C++

Kapendev alexandroskapretsos at gmail.com
Thu Nov 12 04:36:25 UTC 2026


On Wednesday, 11 November 2026 at 13:31:24 UTC, Paolo Invernizzi 
wrote:
> With @nogc I'm sure that the frame loop does not allocate, also 
> in the functions it calls, also in the libraries. A local check 
> can't tell me that.

Not allocate with GC*
You can still allocate with malloc, for example.

A theoretical `pragma(nolocalgc)` applied to every function would 
act the same way as the `@nogc`, but without the complexity of 
the current attribute soup.
Just removing one built-in attribute would simplify writing 
library code by a lot.



More information about the Digitalmars-d mailing list