D needs a type expression syntax

Basile B. b2.temp at gmx.com
Fri May 5 16:26:38 UTC 2023


On Friday, 5 May 2023 at 15:11:50 UTC, Nick Treleaven wrote:
> On Thursday, 4 May 2023 at 15:40:20 UTC, Quirin Schroll wrote:
>> [...]
>
> It could be trailing return type syntax:
> ```d
> function(ref int i) -> ref int refIdPtr;
> ```
> Then we don't need the `alias A = ref T` rule, and we can keep 
> parentheses for expressions (including tuples in future).
>
> [...]

IMO the big problem here, so with `const` is that const cannot be 
put for an hidden parameter...

That's essentially why this strange syntax exists.


More information about the Digitalmars-d mailing list