www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Let us talk about error messages

reply qznc <qznc web.de> writes:
Rust changed their error message format:

https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html

Inspiration for D?
Aug 10 2016
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 8/10/2016 11:28 AM, qznc wrote:
 Rust changed their error message format:

 https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html

 Inspiration for D?
There are some good ideas there. One thing I've idly thought about is to include a clickable link to the relevant section in the spec.
Aug 10 2016
parent Kagamin <spam here.lot> writes:
On Wednesday, 10 August 2016 at 19:20:00 UTC, Walter Bright wrote:
 On 8/10/2016 11:28 AM, qznc wrote:
 Rust changed their error message format:

 https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html

 Inspiration for D?
There are some good ideas there. One thing I've idly thought about is to include a clickable link to the relevant section in the spec.
It would be good enough if the compiler provided the reason for an error in any form, currently it sounds like "can't work", see e.g. https://issues.dlang.org/show_bug.cgi?id=9626
Aug 11 2016
prev sibling next sibling parent Seb <seb wilzba.ch> writes:
On Wednesday, 10 August 2016 at 18:28:00 UTC, qznc wrote:
 Rust changed their error message format:

 https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html

 Inspiration for D?
Yes, please. Hard to understand/confusing error messages were ranked among the three top things that people bother with D (the other things is still the license of DMD) in this recent slant [1]. small rant (from current discussions at Phobos): we should also remove all the silent assert(0) in Phobos that come without any error message, but the segfault. That's a very cheap way to improve the UX. [1] https://www.slant.co/topics/5984/~productivity-enhancing-well-designed-and-concise-rather-than-just-popular-or-time-tested-programming-la
Aug 10 2016
prev sibling next sibling parent jmh530 <john.michael.hall gmail.com> writes:
On Wednesday, 10 August 2016 at 18:28:00 UTC, qznc wrote:
 Rust changed their error message format:

 https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html

 Inspiration for D?
Looks pretty. I remember some discussion about cleaning up error messages when templates don't match. That's probably the most common ugly-looking message I get.
Aug 10 2016
prev sibling parent reply Wyatt <wyatt.epp gmail.com> writes:
On Wednesday, 10 August 2016 at 18:28:00 UTC, qznc wrote:
 Rust changed their error message format:

 https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html

 Inspiration for D?
I'm pretty fond of some of the stuff Elm is doing, too. Like so: https://pbs.twimg.com/media/CiuJyriXAAEiZnd.jpg:large https://pbs.twimg.com/media/CivQW5kUYAAi4SP.jpg:large Some people will bitch about the verbosity, but that sort of thing is GREAT for people just getting into the language. -Wyatt
Aug 11 2016
parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/11/2016 11:30 AM, Wyatt wrote:
 Some people will bitch about the verbosity, but that sort of thing is GREAT for
 people just getting into the language.
I agree too much verbosity can be verbal diarrhea to a regular user of the compiler, but would be helpful to a new user. I expect a switch would be necessary.
Aug 11 2016