Create concious compiler messages

Hi :+1:t3:

As a newbie, one of the hardest parts of Julia for me yet, is clearly its error messages. :frowning:

I find them often to be more confusing than helpful, and I am aware, that a part of this comes from the nature of Julia’s type system.

Also, I think a substantial amount of disorder comes from the lack of conscious formatting, contextual information, and user guidance.

I envision the error reporting to be more akin to Elm, Rust.
And I am more than willing to contribute such conscious compiler communication.

See what John Carmack has to say about this, a known legend in the industry.
Such improved error messaging has shown to be quite popular at the communities, it is introduced.

It is often named as one of the most loved, and outstanding features of said languages.

It seems currently that Julia does only dump the stack trace.

The upcoming JuliaSyntax is thankfully improving the situation significantly, offering a lot more information in its error output.

Let us consciously format and contextualize the output to be more readable.
And to guide the user to documentation.

I think it would benefit the language.

2 Likes

See this thread.

Sadly, this thread has been quickly devolved into a very different topic, in my opinion.

It has not really been perceived as what I intend to say in this post.
And I was reluctant, to unearth this quite old post, so I started a new one.

I really hope, this time, we can speak about the practical application of this proposal.

Not some slight improvement of the existing model.
As is described in that existing thread.

Some of the improvements with JuliaSyntax have landed in 1.10 (not sure if you’re using it). I think the expectation is that these errors will be improved from now, with this framework.

1 Like

Yes, this is why I wrote: ‘The upcoming JuliaSyntax is thankfully improving the situation significantly’ :grin:

Still, it has mostly improved error detection, and NOT how errors are presented.

They have not changed, to my knowledge, how they are set into context, and have not empowered the compiler to guide the user through the steps that follow.

As an example, by providing a link to the respective documentation.

The improvements of JuliaSyntax are huge, I love them, and they barely touch the subject, of what I am talking about here.

There is a huge potential in how the errors are presented, contextualized and how they are used, to inform the user about the mistake they have done.