Thoughts on Backward Compatibility

Dom DiSc dominikus at scherkl.de
Fri Feb 16 10:32:44 UTC 2024


On Friday, 16 February 2024 at 10:10:07 UTC, Dom DiSc wrote:
> On Friday, 16 February 2024 at 04:38:03 UTC, H. S. Teoh wrote:
> I would like D to be a better Rust (as I hate the Rust syntax 
> and the struggle with the borrow checker in code that has 
> really noching to do with memory safety).

nothing

> What I miss most is @safe by default and working @properties 
> (and type-properties: it always bugs me that with user defined 
> properties you need to use myProperty!T instead of T.myProperty 
> - mostly because I tend to always use the wrong systax.

syntax

> I even started to re-define the buildin properties with 
> templates, just so that I can use them all the same way).

what I mean is: if I declare a template with a single 
compile-time parameter as @property:

```d
static @property template myProperty(T) {}
```

it should automatically be callable with "int.myProperty" or 
"myType.myProperty". Should be very easy to implement.


More information about the Digitalmars-d mailing list