digitalmars.D.announce - Safer D is implemented!
- Walter Bright (12/12) Nov 27 https://github.com/dlang/dmd/pull/17044
- Jonathan M Davis (6/19) Nov 28 So, essentially, it makes functions with no explicit @safety attributes ...
- Walter Bright (1/1) Nov 28 Right.
- f (10/11) Nov 28 11 languages have coroutine support natively
- Richard (Rikki) Andrew Cattermole (5/21) Nov 28 I'll be restarting on my language design work, including coroutines next...
- Sergey (5/10) Nov 28 People mostly with C99 and C++(who even touch 20th standard,
- Duan Tihua (6/8) Nov 29 For writing memory safe code, this is a more practical
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.
Nov 27
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
Nov 28
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.
Nov 28
On 29/11/2024 10:30 AM, f wrote:On Thursday, 28 November 2024 at 21:01:30 UTC, Walter Bright wrote: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 :)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.
Nov 28
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: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? :PRight.The coroutine, is a game changer. That will make porting library from other languages straightforward.
Nov 28
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=saferFor 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.
Nov 29