Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
November 27 Safer D is implemented! | ||||
---|---|---|---|---|
| ||||
https://github.com/dlang/dmd/pull/17044 It's enabled with -preview=safer It enables "safe by default". This is different from marking functions as @safe, in that: 1. it does not mark the function as @safe, the function mangling does not change 2. it enables all @safe checks except it does not complain about calling @system functions 3. it does not interfere with attribute inference In other words, it does not impose transitive safety. You can still call malloc() and printf() in it. Once it appears in the next release, I encourage people to add -preview=safer to their build process. |
November 28 Re: Safer D is implemented! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Thursday, November 28, 2024 12:08:29 AM MST Walter Bright via Digitalmars- d-announce wrote:
> https://github.com/dlang/dmd/pull/17044
>
> It's enabled with -preview=safer
>
> It enables "safe by default". This is different from marking functions as @safe, in that:
>
> 1. it does not mark the function as @safe, the function mangling does not change
>
> 2. it enables all @safe checks except it does not complain about calling @system functions
>
> 3. it does not interfere with attribute inference
>
> In other words, it does not impose transitive safety. You can still call
> malloc() and printf() in it.
>
> Once it appears in the next release, I encourage people to add -preview=safer to their build process.
So, essentially, it makes functions with no explicit @safety attributes be somewhere between @system and @safe by disallowing language constructs which are considered @system but not disallowing calling @system functions.
- Jonathan M Davis
|
November 28 Re: Safer D is implemented! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | Right. |
November 28 Re: Safer D is implemented! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Thursday, 28 November 2024 at 21:01:30 UTC, Walter Bright wrote:
> Right.
11 languages have coroutine support natively
Only 1 with full borrow semantics : rust.
That according to chatgpt
Please sir , the coroutine dips is still at 1st draft.
While other dip will make lines fewer , their execution still from top down.
The coroutine, is a game changer. That will make porting library from other languages straightforward.
|
November 29 Re: Safer D is implemented! | ||||
---|---|---|---|---|
| ||||
Posted in reply to f | On 29/11/2024 10:30 AM, f wrote:
> On Thursday, 28 November 2024 at 21:01:30 UTC, Walter Bright wrote:
>> Right.
>
> 11 languages have coroutine support natively
>
> Only 1 with full borrow semantics : rust.
>
> That according to chatgpt
>
> Please sir , the coroutine dips is still at 1st draft.
>
> While other dip will make lines fewer , their execution still from top down.
>
> The coroutine, is a game changer. That will make portingĀ library from other languages straightforward.
I'll be restarting on my language design work, including coroutines next year.
I'm taking a few months where I work on my own stuff.
I have not forgotten any of the design work :)
|
November 29 Re: Safer D is implemented! | ||||
---|---|---|---|---|
| ||||
Posted in reply to f | On Thursday, 28 November 2024 at 21:30:33 UTC, f wrote:
> On Thursday, 28 November 2024 at 21:01:30 UTC, Walter Bright wrote:
>> Right.
> The coroutine, is a game changer. That will make porting library from other languages straightforward.
People mostly with C99 and C++(who even touch 20th standard, right?) experience will answer: we have core.thread and std.concurrency for years.. this is enough, what else do you want? :P
|
November 29 Re: Safer D is implemented! | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Thursday, 28 November 2024 at 07:08:29 UTC, Walter Bright wrote:
> https://github.com/dlang/dmd/pull/17044
>
> It's enabled with -preview=safer
For writing memory safe code, this is a more practical engineering approach. Fortunately, this compilation option will reduce the number of times @safe annotation is used and the code will be relatively cleaner.
|
Copyright © 1999-2021 by the D Language Foundation