December 28

On Tuesday, 26 December 2023 at 19:32:56 UTC, Paulo Pinto wrote:

> >

If D had been safe by default, this would not have been a big issue, even for those of us that don't care about safe by default. But to force this on us entirely because you don't want to add a -safe switch to the compiler is completely unreasonable. (The compiler switch was off the table, but the way you tested out the earlier DIP was by using a compiler switch.)

On which forum post am I advocating against -safe switch?

Not you, but that was the safe by default proposal. It can be done at no cost, but it's hard for improvements that come without cost to get traction around here.

Similar to the LTS discussions. All they needed to do was label some of the releases they were making as "not LTS" and they'd have solved a major problem at no cost. More than six months have passed and there are occasional discussions of "editions" that will solve the same problem. Maybe before 2030.

December 28
On 12/27/2023 12:29 AM, Siarhei Siamashka wrote:
> My understanding is that people are suggesting a new global compiler switch to optionally disable safety (allow `@system` and `@trusted` to be called from `@safe`), which would indeed allow compiling old abandoned libraries and use them from the new code during the transition period.

Hmm, that is an interesting idea. The implementation might be tricky, though, as @safe/trusted/system are baked into the typing system at a fundamental level.
December 29
It may be easier to disable it at the parser level instead of semantic.
January 04

On Friday, 29 December 2023 at 02:04:01 UTC, Walter Bright wrote:

>

On 12/27/2023 12:29 AM, Siarhei Siamashka wrote:

>

My understanding is that people are suggesting a new global compiler switch to optionally disable safety (allow @system and @trusted to be called from @safe), which would indeed allow compiling old abandoned libraries and use them from the new code during the transition period.

Hmm, that is an interesting idea. The implementation might be tricky, though, as @safe/trusted/system are baked into the typing system at a fundamental level.

My idea:
Add @unsafe to act like @trusted, that can be applied on modules, enabling call from @safe but only if a compiler switch was enabled to allow use of @unsafe code. Then change default to @safe.

1 2 3
Next ›   Last »