by klibertp · 13y ago · 0 comments
I see no other resistance than from you, by the way.
Oh, and also: aside from "citation needed" your argument that "many people think the same" is an argument from authority, which is rather weak thing to do.
No, he does not. Read his code, it is full of single letter variables.
As a final note in this discussion I'd like to say that you're probably misunderstanding me. I have never said that single-letter names are completely prohibited - just that they should be avoided when possible.
I actually went and did some analysis on the code I think is good: Underscore.js. This is what I found.
I excluded all language keywords like `var` and `if`. I then calculated how many unique names there are in the code and how many of them are 1 or 2 letters long. The result I got was 4%.
I then checked how many times each of the names was used and how many times 1 or 2 letter long names were used, Surprisingly I got almost the same result - 4%.
So, to conclude - if more than 4% of names you use are shorter than 3 characters than you're writing bad - or at least worse than Underscore.js - code. I'm not guilty of this, I checked my own code too. And how about you?
Also, on a more personal note - you're infuriating as a adversary in the discussion because of at least three things: you only answer to parts of arguments that are convenient to you, you don't openly state assumption you're making and you're mixing completely irrelevant things into the discussion. Please improve :)