Re:Airbnb JavaScript Style Guide
by thomasfoster96 on Thursday July 02, 2015 @10:40PM
(#9823101)
Having seen this updated version I'm not terribly impressed at their guide for ES6. No mention of symbols (which are pretty important if you're using classes), generators are ignored almost entirely, a pretty poor explanation of modules, etc.
[ Parent
| on HN ]
You're in luck! They published this in GitHub so you can suggest changes you think might make things better.
Re:Airbnb JavaScript Style Guide
by thomasfoster96 on Thursday July 02, 2015 @11:49PM
(#9823345)
Well, style guides are fairly subjective projects compared to most other open source projects, so while it might be worth my while suggesting things, it's not likely airbnb is going to change their style guide because I think differently to them.
Edit: Looking at some issues in the style guide repo, AirBnB seems reluctant to add or change the style guide to deviate from what they do internally (for instance, generators are rarely used, therefore they aren't encouraged).
Re:Airbnb JavaScript Style Guide
by dikaiosune on Thursday July 02, 2015 @11:37PM
(#9823296)
This has always been one characteristic of open source standpoints that I'm not such a big fan of. It's too tightly coupled to expect everyone with constructive criticism to also contribute. Yes, it would be good if they did. But it would strike a serious blow to many projects' mental capital if the only feedback they took from users was from those users capable (either technically or in possession of enough free time) of contributing the changes themselves.
Um:
> Don't use generators for now.
>> Why? They don't transpile well to ES5.
Same thing with Symbols?
Re:Airbnb JavaScript Style Guide
by anustart666 on Thursday July 02, 2015 @11:35PM
(#9823287)
Did you even read it? They don't use the meme 'symbols' but clearly mention 'dynamic property names'.
Re:Airbnb JavaScript Style Guide
by thomasfoster96 on Thursday July 02, 2015 @11:46PM
(#9823334)
Dynamic property names are quite different to Symbols in ECMAScript 6.
Re:Airbnb JavaScript Style Guide
by anustart666 on Thursday July 02, 2015 @11:58PM
(#9823366)
Use a global const for keygen, 'symbol' is most likely just a syntactic sugar for global const...
Re:Airbnb JavaScript Style Guide
by thomasfoster96 on Friday July 03, 2015 @12:05AM
(#9823387)
Well a Symbol is guaranteed to be unique (unless you use the symbol registry) and can't be converted to a string - things that you can't say about a global const that is a string.