logoalt Hacker News

tuvesontoday at 5:09 PM3 repliesview on HN

I’ve often thought it would be funny if instead of an error message for stuff like this, a language could be designed to be “typo-insensitive”. If a method or function call is similar enough to an existing one or a common one from other languages, to just have it silently use that.


Replies

estebanktoday at 5:23 PM

VisualBasic did that. I think it is a mistake. But that doesn't mean that the compiler can't detect that and tell you how to fix it instead.

show 1 reply
QuesnayJrtoday at 5:58 PM

Lisp had a package for that, DWIM, in the late 60s: https://en.wikipedia.org/wiki/DWIM.

MarkusQtoday at 5:18 PM

I hope you mean "funny" in the "hilarity ensues" sense.

Because the alternative is a rather sociopathic level of schadenfreude.

show 1 reply