Re:Airbnb JavaScript Style Guide
by bshimmin on Friday July 03, 2015 @04:01AM
(#9824188)
What is unreadable about "klass"? Rails, for example, uses "klass" and it's never been hard for me (or, I suspect, anyone) to understand.
[ Parent
| on HN ]
The problem I see with "klass" is that you can't easily talk about it to another developer. e.g.:
"Make sure you set the class-with-a-k property to 'alien'."
"Make sure you set the type property to 'alien'."
They probably don't mean 'class' in the programming language sense and should therefore use another name.
Well maybe they are using "class" in the OOP sense, for instance if they're implementing a programming language. Even if they're not, if they use the word "class" in the specification for what they're implementing (maybe they're representing a taxonomical hierarchy in their program and have fields named "kingdom", "phylum", "class", etc), or have the word "class" in a user facing output (maybe they're making an RPG where a character object has fields "race", "class", "level").
It's confufing to use one name inside your code and different one elsewhere.