
Making Wrong Code Look Wrong - JoshTriplett
http://www.joelonsoftware.com/articles/Wrong.html
======
JoshTriplett
This came up recently in the context of type systems and the "what color is
your function" article
([https://news.ycombinator.com/item?id=8984648](https://news.ycombinator.com/item?id=8984648)),
and it seemed worth posting separately for the sake of discussion.

The history of Hungarian notion seems interesting. It's a workaround for
insufficient type systems, but a rather reasonable one for a large legacy code
base that didn't have the option of switching to a better language with a
better type system.

More importantly, the concept of making your intuitive sense of "rightness"
and "wrongness" align with semantic correctness and incorrectness makes
perfect sense. Type systems then let you convince the compiler to go along
with that. On Rusty Russell's "hard to misuse" scale, a good type system can
raise your code from "The name tells you how to use it." (and in some cases
"The obvious use is (probably) the correct one.", as with the SFromUs function
in the article) to "The compiler/linker won't let you get it wrong."

