dip1000 and preview in combine to cause extra safety errors

H. S. Teoh hsteoh at qfbox.info
Wed Jun 8 23:47:47 UTC 2022


On Wed, Jun 08, 2022 at 04:21:33PM -0700, Walter Bright via Digitalmars-d wrote:
> On 6/8/2022 12:18 PM, claptrap wrote:
> > Isn't the DIP process supposed to catch these sorts of things?
> 
> It does catch those sorts of things. But the checks do not happen for
> @system code, and the code snippet is @system code.
> 
> I submitted a DIP to make @safe the default (rather than @system) but
> it was rejected. This is the result.

I was in favor of the @safe by default DIP. The only amendment I wanted
was that @safe by default would only apply to extern(D) functions, which
IIRC just about everyone else also wanted.  IIRC, you were the only one
who opposed this amendment, which then caused the majority to reject the
DIP.

Had you accepted the compromise then, we would already have @safe by
default today.  So it seems a bit incongruous to now place blame on the
DIP being rejected, as though everyone flatly rejected the whole idea.
Such was not the case. A compromise *could* have been reached.

(And for the record, if the amended DIP were to be submitted today, I'd
vote in favor. @safe by default is a good thing to have -- except on
extern(C) interfaces to C code, which by definition is un- at safe -- the
most it can be is @trusted, and I'm sure nobody wants @trusted by
default.)


T

-- 
Long, long ago, the ancient Chinese invented a device that lets them see through walls. It was called the "window".


More information about the Digitalmars-d mailing list