On Sunday, 9 July 2017 at 13:26:31 UTC, Adam D. Ruppe wrote:
The error message sucks, but you clearly have a string when you meant string[].

To answer the part "why" about them sucking, is that they are generic.

Were join() just a regular function taking two strings, or two interfaces which string would implement, the messages would be better. I my experience D compiler is excellent at error messages when you don't go generic. Of course, that does not help much because the standard library is templated, not object-oriented.

Generics, and metaprogramming in general, is extremely hard to implement so that the error messages are even close to as good as elsewhere. No matter the language. Or rather, it can be made to give good messages, C# is a piece of proof for that. But that's also a reson why C# templates are so wimpy and ungeneral compared to C++ and D.

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!

Reply via email to