D not considered memory safe
Timon Gehr
timon.gehr at gmx.ch
Thu Jul 11 10:20:58 UTC 2024
On 7/11/24 04:36, Walter Bright wrote:
> On 7/10/2024 7:31 PM, Walter Bright wrote:
>> The missing feature is there:
>>
>> ```
>> @safe {
>> .. templates that must be safe ..
>> }
>>
>> .. templates that infer safe ..
>> ```
>
> I might also add that it is good practice to put your unsafe code in
> another module, as well as code that may be inferred as unsafe.
>
> In any case, we can keep adding more and more features to the language
> that add very little. But it's not going to go well, and nobody is going
> to read the 1000 page specification. C and C++ have both gone down that
> path.
>
>
The simple point remains that Steven is absolutely correct that putting
`@safe:` does not work.
More information about the Digitalmars-d
mailing list