Re:Elm 0.19.1
by miki123211 on Monday October 21, 2019 @12:07PM
(#21313887)
I hate using ^ to indicate an offending position on a line. For those unfamiliar, the idea is that you display two lines, the erroneous one, and one full of spaces, with a single ^ in it, where the ^ is directly underneath the offending character. This is bad for accessibility and screen readers. They read that the ^ is here, but actually finding out what the wrong character is is problematic. Python does this, I think Rust too, and now Elm. Just provide a column number next to the line number, just like Golang does. Any decent editor will let me check what column I'm on. The ^ can, of course, be kept for the rest, but the column number would be a welcome addition.
[ Parent
| on HN ]
I can’t speak for the others, but at least in Rust the column number is at the end of the first line of the error, in format file.rs:line:column, eg main.rs:5:10
There are a few example errors here: https://github.com/rust-lang/rust/issues/36611
Are the annotated code snippets after the first line useless with screen readers? I wonder if there’s a flag to hide just the snippets.
Re:Elm 0.19.1
by steveklabnik on Monday October 21, 2019 @03:39PM
(#21316349)
There is a flag to hide the snippets and give a more compact output; you can also get it in JSON, I believe.
Re:Elm 0.19.1
by miki123211 on Tuesday October 22, 2019 @01:21AM
(#21320574)
seems I was mistaken, Rust seems fine. I was probably misremembering, as I haven't played much with it. The point about Python and other still stands, though.