Can jank beat Clojure's error reporting?

45 points by jeaye


technomancy

This is really good stuff, and I love to see it. Beating Clojure’s error reporting is admittedly a very low bar, but Jank does a good job here.

That said, there’s one mistake here that is very common: using the ^^^^ markers to highlight the code elements that caused the problem does not work reliably: https://reedmullanix.com/posts/unicode-source-spans.html (and fundamentally cannot work reliably)

This technique is based on the mistaken assumption that characters are always rendered on a monospace grid. As soon as you have code that incorporates wider characters you can see where it breaks down, but ironically the blog post demonstrates this breakdown in an even more obvious way, by displaying its code samples in a proportional-width font. This causes the marker characters to be wildly out of place.