Re: Complicated Types: Prefer “alias this” Over “alias” For Easier-To-Read Error Messages

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Mon May 21 20:31:54 UTC 2018


On 05/21/2018 01:43 PM, Steven Schveighoffer wrote:
> Nice idea, I wonder if the compiler couldn't do this automatically with 
> alias, however. It already does this in some cases (e.g. string instead 
> of immutable(char)[]).
> 
> This would help solve the problem that error messages aren't going to 
> get better when you pass it into something that only accepts the aliased 
> type. However, for the most part, these are non-template functions anyway.

That was discussed and rejected some years ago. IIRC, Walter just didn't 
like it.

I'd certainly be in favor of it though. But in lieu of that...


More information about the Digitalmars-d-announce mailing list