No we should not support enum types derived from strings

Steven Schveighoffer schveiguy at gmail.com
Fri May 7 18:44:26 UTC 2021


On 5/7/21 2:17 PM, Adam D. Ruppe wrote:
> I think it was actually a mistake for Phobos to UFCS shoe-horn in range 
> functions on arrays too - this includes strings as well as int[] and 
> such as well.

The most common range BY FAR in all of D code is an array.

The end result of something like you allude to would result in nearly 
all of phobos NOT working with arrays.

Just a taste:

int[] arr = genArray;
arr.sort(); // fail.

I don't want to go to that place, ever.

-Steve


More information about the Digitalmars-d mailing list