This was originally a commentary on the talk by Jon Blow about creating a programming language designed specifically for games. At one point he mentions “Pleasant and helpful error messages” and I got caught up thinking about what that would really entail. So let’s talk about compiler errors.
Compilers are very bad at giving us useful error messages. I’ve been doing this for decades and I still get errors that baffle me. You could make the case that “better error messaging” could be a whole project in itself. You could keep yourself pretty busy by just ditching the whole “new language” idea and just attempting to give the C++ compiler more useful output. (Although that’s probably a bad idea, for reasons I’ll talk about below.)
There are errors that don’t make sense and point to things that aren’t the source of the problem. They also lean really heavy on the jargon. This is a subject near and dear to my heart. I mean, this article exists because I have this compulsion to help other people understand difficult things.
Lots of people point to templates and classes as a source of baffling messages. But rather than dive into the deep parts of the language or pick on some goofy obscure edge-case, let’s look at a really simple error:
Continue reading 〉〉 “Pleasant and helpful error messages”
 T w e n t y S i d e d
 T w e n t y S i d e d

 
	 
	 
	








