Editions Ideas

Dukc ajieskola at gmail.com
Mon Dec 15 10:16:55 UTC 2025


On Monday, 15 December 2025 at 04:41:39 UTC, Jonathan M Davis 
wrote:
> That does not preclude improving the language later and making 
> @safe apply to more as we're able to do so, but we should not 
> leave holes in @safe just because we don't like the fact that 
> we can't currently guarantee that something is memory safe.
>
> - Jonathan M Davis

Actually, maybe that's a good solution for the next edition. You 
can't return a slice of a static array, or a pointer to a struct 
field in stack anymore, except if you use DIP1000. Without the 
switch, you have Roberts Simple Safe D[1]. With the switch on, 
you'll have DIP1000. In either case, you'll have to deal with 
lots of breakage. If you want to wait for a better solution 
before breaking your code, you can stick with the older edition.

Then we'll see which solution people really prefer.

[1]: Well actually it's a bit more permissive than Roberts 
proposal. Robert proposed no returning by ref, but actually you 
can safely return by ref even without dip1000 as long as you have 
dip25, which is already enabled by default. It's only taking 
addresses or slices of local struct/union fields and static 
arrays which needs dip1000 for safety.


More information about the Digitalmars-d mailing list