Open m90 opened 9 years ago
Yeah, it should definitely be separate (as with python/python3)
@adambard I think the python/python3 case won't be good here since Python 3 breaks backwards compatibility quite enormously, while ES6 is 100% backwards compatible with ES5 (leave for some minor edge cases rarely ever encountered IRL which nobody cares about).
Although I 100% agree that ES6 is one major update (http://i.imgur.com/X53WgY6.png), it'd still not be that much of a big addition to the current JS doc at learnxiny because of the conciseness that learnxiny docs aim for. For instance, most of the new additions to Array.prototype and String.prototype wouldn't make for much place in the doc just like Array.prototype.forEach
and ilk aren't documented in the current ES5 doc.
Addition of the new syntax (arrow functions, destructuring etc) and exotic objects (like generators and proxies) should do, IMHO.
Thoughts?
Agree with @awalGarg here. DRY. A concise addition to the existing ES5 one should be better than duplicating thing like simple math.
@awalGarg explains it really well. I agree keeping it all in 1 doc.
Sorry for taking so long, finally got round to doing it
There's two good PRs adding ES2015 already, and my intention is to do a bit of editing and merge the best of both; I'd forgotten about this but now that I've been reminded I'll do it this weekend.
Originally when those PRs came up I agreed with @adambard that ES2015 deserved its own article, but now that all modern browsers support nearly all of it I think it's appropriate to merge it into the original, indicating which parts are ES2015-only as appropriate.
Yes, I agree with this -- we can start adding features to the JS article. I guess I'll try to dredge up one of the old PRs and see if they still merge
I'm going to edit the best bits of both of them into the current document manually this weekend; given how long it's been that's probably a better option than unleashing git merge onto it.
I also wanted to go through which features were and weren't mentioned; IIRC there were a few things in each of them that I didn't feel warranted a mention in LXIYM. I'll post the updated version as a PR to get feedback once it's done.
@adambrenecki, thanks a lot! I'm still cleaning here a bit, that's why I'm raising those old issues :).
PR #2858.
Can I work to just replace all of the var
's with let
and const
. Since, to my knowledge, in most cases today, using var
is bad practice. Given that the majority of the guide uses var
, it might lead beginners down some headaches. There's also no mention of classes for OOP.
I also don't see the point in separating ES6 and <ES6 anymore. I propose the whole document be re-written in modern standards. I can get started on that if someone on the core team agrees. @adambard
@jameszhang-a I agree with this, it's time.
There needs to be ES6. Anyone working on that already?
I'm not too sure though if this should be treated as a separate language or go as an addendum to JavaScript (will probably break the runnable example rule)?