Re: [m-users.] Free and Ground in the same error line?

"Zoltan Somogyi" <[email protected]> Sat, 28 Oct 2023 22:05:57 +1100 (AEDT)
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
On 2023-10-28 21:53 +11:00 AEDT, "Volker Wysk" <[email protected]> wrote:
> I have the impression that the compiler often gives complicated error
> messages for stupid errors... 

The two main factors influencing whether the compiler will have a direct,
specific error message for a class of errors are

- how frequent that class of errors appears to be, and
- how difficult that class of errors is to isolate from other classes.

It is a sad fact of life that the people judging the frequency
of error classes are the compiler developers. Since their errors
have a different frequency distribution from other language users,
the work they (we) put into improving error messages usually
benefits us more than it benefits general users. That said, we of course
do try to improve messages even for errors we don't encounter
ourselves. (For example, I wouldn't encounter this bug, because
I stopped using DCGs ages ago.) Of course, this does require that
such problems be brought to our attention. That usually works;
for example, I extended the error message mmc generates
for references to undefined types, predicates etc with "did you mean"
suggestions (such as "circle" for "cirle") a few days after the m-users
thread about that error.

So if you get a complicated error message for an error, stupid or not,
you know what to do.

Zoltan.
_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users