Does `is` expression with template alias need fixing.

Elfstone elfstone at yeah.net
Tue Mar 28 07:50:00 UTC 2023


On Monday, 27 March 2023 at 22:33:14 UTC, Timon Gehr wrote:
> On 3/23/23 01:23, Elfstone wrote:
>> On Wednesday, 22 March 2023 at 11:00:40 UTC, zjh wrote:
>>> On Wednesday, 22 March 2023 at 10:43:15 UTC, Elfstone wrote:
>>>> ```C++
>>>> template <typename T>
>>>> using Vector3 = Matrix<T, 3, 1>;
>>>> ```
>>>>
>>>> I declare an alias and I use it everywhere. It acts as a 
>>>> natural constraint. I never needed `isVector3` with my old 
>>>> C++ code. I expected D could do the same, and was really 
>>>> frustrated when I found out it couldn't. Even more 
>>>> frustrated when I read Steven's reply, that the bug with 
>>>> `is` has been there for 16 years.
>>>>
>>>
>>> When you have questions, please file a bugzilla.
>>> D is only for `specific problems`, please describe the 
>>> problem carefully.
>> 
>> There are already a ton issues about this filed, including 
>> Steven's 16 years old one. It seems the community lacks the 
>> motivation to fix it. That's why I started this thread.
>
> That's just not true. People are motivated enough to fix it 
> technically, but not to go through the motions needed to get 
> their contribution actually accepted into the language.
>
> https://forum.dlang.org/post/kvcrsoqozrflxibgxtlo@forum.dlang.org
> https://github.com/dlang/dmd/pull/9778
> https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1023.md#reviews
>
> However, unfortunately the DIP process is often where 
> contributions go to die. I guess one reason for this is because 
> it is not so easy to enforce your own quality standards on the 
> volunteer work of others and people have different priorities.

I understand. I'm aware of DIP1023 and I did mention it in my 
original post. Not trying to overlook the attempt, but it 
seemingly died. This is where we are at.
All I can do is voice myself, hoping more people will notice and 
agree this is a problem - 'cause that's how I reason why D has 
offered so much but left such a hole in `alias` - still not 
enough people see it as a big hole.
Well it's not that big but it's a scar in the core. People do 
fall into it, and the error message is nonsense.


More information about the Digitalmars-d mailing list