D needs a type expression syntax
Paul Backus
snarwin at gmail.com
Fri May 5 04:34:44 UTC 2023
On Friday, 5 May 2023 at 02:30:32 UTC, Basile B. wrote:
> On Thursday, 4 May 2023 at 15:40:20 UTC, Quirin Schroll wrote:
>> **TL;DR:** If we make `TypeCtor` optional in the production
>> rule `BasicType` → `TypeCtor`**`(`**`Type`**`)`**, the D type
>> grammar can be improved and we have a way to solve the
>> 14-year-old [issue
>> 2753](https://issues.dlang.org/show_bug.cgi?id=2753).
>>
>> [...]
>
> Wouldn't making `ref` a TypeCtor solve the issue more simply ?
The main problem with making `ref` a TypeCtor is that it would
allow semantically-invalid types like `ref(int)[]` and
`Tuple!(ref(int), ref(int))` to parse.
More information about the Digitalmars-d
mailing list