-preview=in might break code

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Oct 2 23:03:49 UTC 2020


On Friday, 2 October 2020 at 22:46:11 UTC, tsbockman wrote:
> On Friday, 2 October 2020 at 22:27:33 UTC, Ola Fosheim Grøstad 
> wrote:
> As I said earlier in this thread, if people are very worried 
> about the undefined behavior, then perhaps the cases which are 
> not proven by the compiler to have the same effect should be 
> @system. There are essential features in D already that cannot 
> be verified by the compiler; that's what @system is for.

I have no issues with undefined behaviour as long as it is easy 
to understand and explain, like requiring 'in' params to be 
nonaliased in the function body. It has to be easy to grok and 
remember.

However the D community tends to want D to distinguish itself 
from c++ in this regard.







More information about the Digitalmars-d mailing list