Some languages help with misspellings by not just saying “‘foobra’ is not a function”, but also “but ‘foobar’ is. Did you mean to write that?”.
I guess you could also require the edit distance between identifiers to be at least X, but I expect that to be wildly impopular, if only because its effect on identifiers in libraries.
I guess you could also require the edit distance between identifiers to be at least X, but I expect that to be wildly impopular, if only because its effect on identifiers in libraries.