5 ms·
Compilers as Teachers
- pjmlp 5y agoGreat example of usabilitiy improvement.
- wolfadex 5y agoA little history of why Rust's error messages look and read they way they do: - [1] back in 2015 Elm puts out a blog post titled Compiler Errors for Humans - [2] then another, Compilers as assistants - [3] then in 2016 Rust announces they'll borrow from Elm for error messages Really great that the students were able to see how much the Rust community cares about error message quality. 1. https://elm-lang.org/news/compiler-errors-for-humans https://elm-lang.org/news/compiler-errors-for-humans 2. https://elm-lang.org/news/compilers-as-assistants https://elm-lang.org/news/compilers-as-assistants 3. https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-com...
- steveklabnik 5y agoAnd importantly, ever since these events, keeping up the workflow described in the post: treating bad diagnostics as bugs, and having some hard-working, dedicated folks just grinding out the improvements. There is a looooong tail here.
- asicsp 5y agoAnd now Python seems to be following their footsteps: https://twitter.com/pyblogsal/status/1416034899639750659 https://twitter.com/pyblogsal/status/1416034899639750659
- pjmlp 5y agoTurbo Pascal also provided a nice experience, that I quickly missed when I moved into C and C++ world of endless error messages when a semi-colon is out of place.
- azhenley 5y agoThere is a really interesting paper, Do Developers Read Compiler Error Messages? https://static.barik.net/barik/publications/icse2017/PID4655707.pdf https://static.barik.net/barik/publications/icse2017/PID4655...
- Wowfunhappy 5y ago(Just in case what I'm about to say makes anyone squirm—I promise this code was for personal use and should never have been used in production!) I first started dabbling in C programming because I was coming across (open source) software that did everything I wanted save for one or two small problems, and I wanted to make changes. I'd only worked with higher-level languages in the past, and so I quickly discovered that I had no idea what to do with pointers. I understood what they were, conceptually, but not when or why to use them within these large existing codebases. So, um, I basically just started doing whatever the compiler said to. When I used the wrong symbol for a variable, the IDE displayed a warning, and I'd cycle through the possibilities (foo, *foo, &foo, **foo, etc) until the warning went away. Somewhat to my own surprise, this strategy absolutely worked—I can't recall a time when it led to a problem. ...and I'm not sure that's a good thing. It was certainly helpful, but I didn't learn anything.