Allow default constructors for structs

Paul Backus snarwin at gmail.com
Thu Sep 5 19:30:14 UTC 2024


On Thursday, 5 September 2024 at 18:32:07 UTC, Quirin Schroll 
wrote:
> Simple. Burn `init` with fire and give up the idea that every 
> type has a default value. It was never true due to `void`, but 
> with `noreturn`, it’s gotten worse. Adding non-nullable types 
> is impossible really with also requiring each type have a 
> default value.

Perhaps a more moderate approach would be to make accessing 
`.init` a `@system` operation for types with default constructors 
(including `@disable`d default constructors).


More information about the dip.ideas mailing list