No we should not support enum types derived from strings
deadalnix
deadalnix at gmail.com
Wed May 12 11:19:54 UTC 2021
On Wednesday, 12 May 2021 at 05:25:59 UTC, Mathias LANG wrote:
> Well, this thread is 11 pages and show no sign of winding down.
> In the meantime, has anyone looked at the code that sparked
> this outrage ?
>
> [As I mentioned in the
> PR](https://github.com/dlang/phobos/pull/8029#issuecomment-834221552), the issue wouldn't have happened if the `fmt` template parameter was a `string` and not an `alias`.
>
>> Q: why is fmt an alias and not a simple string ?
>> A: No real reason.
>
> The way I see it, the issue is valid, the fix wasn't. `format`
> API should have accepted a `string` and let the compiler
> perform any allowed implicit conversion, instead of taking
> exactly the type via `alias`.
>
> I wish our most competent contributors would find it more
> interesting to direct their attention to Github or promote the
> language to their large Twitter following over engaging in
> flamewar.
If formats expects a string, then it is indeed the right thing to
accept a string :)
But that discussion goes further than this, and is necessary, IMO.
More information about the Digitalmars-d
mailing list