News for hackers. Stuff that matters.
Re:Airbnb JavaScript Style Guide by bshimmin on Friday July 03, 2015 @04:01AM (#9824188)

   3.3 Use readable synonyms in place of reserved words.

   // bad
   const superman = {
     class: 'alien',
   };

   // bad
   const superman = {
     klass: 'alien',
   };
What is unreadable about "klass"? Rails, for example, uses "klass" and it's never been hard for me (or, I suspect, anyone) to understand.
Re:Airbnb JavaScript Style Guide by cmrn on Friday July 03, 2015 @04:14AM (#9824243)
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'."

Re:Airbnb JavaScript Style Guide by jbergens on Friday July 03, 2015 @04:21AM (#9824266)
They probably don't mean 'class' in the programming language sense and should therefore use another name.
Re:Airbnb JavaScript Style Guide by adrusi on Friday July 03, 2015 @02:04PM (#9827010)
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.