dip1000 and preview in combine to cause extra safety errors
Mathias LANG
pro.mathias.lang at gmail.com
Thu Jun 9 01:27:31 UTC 2022
On Thursday, 9 June 2022 at 01:18:30 UTC, Steven Schveighoffer
wrote:
>
> 2. The programmer is *not* expecting this. They did not write
> `scope`, they wrote `in`, which according to the spec is
> "equivalent to const" (see
> https://dlang.org/spec/function.html#in-params). I'm convinced
> that we *absolutely cannot* turn on preview in by default until
> this is addressed. I can't even recommend using the preview
> switch, as this is too dangerous for memory safety.
According to the spec, `in` means `const scope` when you are
using `-preview=in`.
More information about the Digitalmars-d
mailing list