Why is phobos so wack?
Adam D. Ruppe via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jul 9 15:20:02 PDT 2017
On Sunday, 9 July 2017 at 17:13:11 UTC, Dukc wrote:
> To answer the part "why" about them sucking, is that they are
> generic.
Eh, that's not really why... this is just a crappy
implementation. We can do a lot better with the library and a lot
better with the compiler without losing any of the genericness.
> Were join() just a regular function taking two strings, or two
> interfaces which string would implement, the messages would be
> better.
Better yes, but still actually a bit crappy. I have one step of
an improvement in the works:
https://github.com/dlang/dmd/pull/6806
Consider something similar to that for the constraints too. It
could highlight that you passed a string instead of a "range of
ranges" and you'd have a pretty good idea at a glance, even with
the generic templates.
> About C++ from what I've heard, generic error messages there
> are not only much worse than others, they are much worse than
> even D template errors!
Indeed.
More information about the Digitalmars-d
mailing list