DIP 1023--Resolution of Template Alias Formal Parameters in Template Functions--Community Review Round 1

jmh530 john.michael.hall at gmail.com
Wed Sep 11 12:47:45 UTC 2019


On Wednesday, 11 September 2019 at 12:11:21 UTC, Stefanos 
Baziotis wrote:
> [snip]
>
> I understand the reasoning, yes. I also think it would be very 
> beneficial.
> The problem is that throwing templates in general into the mix 
> I think
> will make the DIP way complicated. Also, I don't think I will 
> be able
> to derive a formal specification.

Even if it's too complicated to support the use case I described 
above as part of this DIP, I still think this has a lot of value.

Another reason I brought up that potential use case is that if it 
enabled that pattern then it might have helped convince Atila the 
DIP was a good idea if he could see the benefits with respect to 
one of his libraries.

>
> Btw, IMHO, templates are in general under-specified. Both in D 
> and C++.
> I might have missed something but to the best of my knowledge, 
> they're
> constrained to intuitive descriptions and examples. Especially 
> considering
> the C++'s `using`. And then it is left to the compiler 
> implementor
> to get to a specific behavior.
>

I'm sure people would appreciate any enhancements to the D 
specification.


More information about the Digitalmars-d mailing list