February 02, 2022
On Wed, Feb 02, 2022 at 11:40:09AM -0500, Steven Schveighoffer via Digitalmars-d-announce wrote: [...]
> D error messages can be bad. Especially when you are using lots of range wrappers. It all depends on what you use.
[...]

True. I've had my fair share of WAT moments with D error messages.

The worst IME are the ones coming from nested templates with lambdas, like when you use lots of range wrappers like you said. No thanks to the way dmd handles speculative compilation by gagging errors, a single typo in a lambda causes an error that gets gagged, then no thanks to D's equivalent of SFINAE the compiler then proceeds to attempt to instantiate completely unintended, unrelated template overloads, going deep into a rabbit hole that ultimately ends with an obscure error deep inside a totally unrelated overload that doesn't give the slightest clue as to what the real error is.

I've often had to resort to manually instantiating templates, or worse, rewriting the lambda as an actual function and instantiating it manually, in order to discern what the error is. There's of course -verrors=spec, but that ungags ALL gagged errors, which in a non-trivial program results in the actual error being drowned in an ocean of totally unrelated errors.


> But C++ is a low bar ;)
[...]

On Wed, Feb 02, 2022 at 04:40:04PM +0000, Adam D Ruppe via Digitalmars-d-announce wrote: [...]
> No incompatibility there: "better than C++" is a very low bar.

No argument there. :-P


T

-- 
Heads I win, tails you lose.