No we should not support enum types derived from strings

Steven Schveighoffer schveiguy at gmail.com
Fri May 7 17:16:06 UTC 2021


On 5/7/21 1:05 PM, Steven Schveighoffer wrote:
> I think the problem here is that the language doesn't give you a good 
> way to express that. So we rely on template constraints that both can't 
> exactly express that intention, and where the approximations create 
> various template instantiations that cause strange problems (i.e. if you 
> accept an enum that converts to string, it's still an enum inside the 
> template). Whereas the language

I forgot to finish this thought, got interrupted.

Whereas the language (with non-template parameters) does the matching 
and conversion simultaneously without needing special cases.

-Steve


More information about the Digitalmars-d mailing list