If you could make any changes to D, what would they look like?

SealabJaster sealabjaster at gmail.com
Wed Oct 20 10:28:35 UTC 2021


On Wednesday, 20 October 2021 at 10:07:40 UTC, Elronnd wrote:
> - First class support for non-nullable pointers and explicitly 
> optional pointers

We can only dream.

> - Class instances should not be reference types

Interesting opinion. So classes would essentially be structs with 
a v-table (similar to C++ I believe)? From a quick think about 
how things would work, it seems like it's simplify generic code 
littered with `static if(is(T == class))`.

> - || and && should not coerce to boolean (x || y is x ? x : y 
> (but without double eval); x && y is x ? y : typeof(y).init)

I like that. It's similar to the likes of Lua where you can go 
`var = var or {}`


More information about the Digitalmars-d mailing list