Nonnullability Switch for classes akin to C#?

Chris wendlec at tcd.ie
Wed Aug 16 08:50:51 UTC 2023


On Wednesday, 9 August 2023 at 04:39:59 UTC, FeepingCreature 
wrote:
> On Tuesday, 8 August 2023 at 19:39:22 UTC, sighoya wrote:
>> [...]
>
> Neat has it! `Class c = null` is a compile error, you have to 
> write `nullable Class c = null`. This is longer than `Class?`, 
> but that's deliberate, because I want to make nullable classes 
> a bit awkward to slightly discourage their use. The only 
> difference is that `null` only implicitly converts to `nullable 
> Class`. It works pretty well, but D prefers that all types have 
> a defined initializer.
>
> [...]

So is Neat some sort of D3, a clean and lean version? Sounds 
interesting. Do you have a roadmap, and most importantly: does 
Neat support cross-compilation to many different OSes and 
architectures (like e.g. Zig)?


More information about the Digitalmars-d mailing list