Beta 2.104.0

Basile B. b2.temp at gmx.com
Tue May 2 11:10:50 UTC 2023


On Tuesday, 2 May 2023 at 08:47:35 UTC, Iain Buclaw wrote:
> On Tuesday, 2 May 2023 at 03:08:00 UTC, zjh wrote:
>> On Tuesday, 2 May 2023 at 00:34:45 UTC, Iain Buclaw wrote:
>>> Glad to announce the first beta for the 2.104.0 release, ♥ to 
>>> the 36 contributors.
>>>
>>
>>
>> [104](https://dlang.org/changelog/2.104.0.html)
>> ```d
>> alias Tint = int;
>> @Tint void f();
>> ```
>> Here says not to use basic types as attributes, but the 
>> following example give it another basic type?
>> ```d
>> @int void f();
>> ```
>
> The keyword here in the changelog is: **would**; that is to 
> say, the compiler previously rejected basic types, but now they 
> are accepted.
>
>> It was already allowed to put types in UDAs, but the parser 
>> would reject basic types written directly, requiring the use 
>> of an alias.
>
> I'll have a think about how that entry could be rephrased to 
> avoid confusion, though you are welcome to raise your own pull 
> request to clarify the wording.

That's a half baked change, it would have been better to go a bit 
further:

previously

```d
alias Tint = int;
@Tint void f();
```

now

```d
@int void f();
```

nice. But previously


```d
alias Tint = int;
@Tint(1) void f();
```

now

```d
@int(1) void f(); // Not Good
```

that's unfortunately still an error.


More information about the Digitalmars-d-announce mailing list