-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ES6 #83
Comments
I can do it if you want. |
Better than rewriting why not provide the ES6 alternative alongside the ES5. I would be 👍 for that. |
👍 Re-write, there are few references at 1-liners |
+1 |
I would rather not put the two together. My preference would be a "second edition" fork for es6. That way people are not forced to use babel or bombarded with examples. |
+1 for the second edition per @DrBoolean or alternative along side it per @SDWolf ...a lot of people have yet to learn the new ES6 syntax and features. I think it is better not to necessarily require them to be super up to date on their language knowledge (as well as build process - babel/etc). |
@DrBoolean Is there any reason to support version for out of date standard? I think only lazy didnt use babel. This book is not for lazy people :) |
@gyzerok How about front end javascript (browsers). It's gonna take a while for them to be ES6 compliant. |
@SDWolf A lot of software are still written with .NET 2.0. Does it mean we need to write new books for it? Out of date langs are used all over the place, not only in web world (javascript). |
@gyzerok just don't rush to take ES5 out. Having a reference to the "old way of doing things" can be useful in learning. |
Just to add to this a bit... using But since this is a book, perhaps that might just add additional complexity to understand the examples. And maybe doesn't allow one to differentiate between library and non-library functions as easily. Totally a style thing, so feel free to ignore. import { compose, prop, map} from 'ramda';
...
let mediaUrl = compose(prop('m'), prop('media'));
let srcs = compose(map(mediaUrl), prop('items'));
let images = compose(map(img), srcs);
let renderImages = compose(Impure.setHtml("body"), images);
let app = compose(Impure.getJSON(renderImages), url);
app("cats"); |
+1 for the ES6 alternative alongside the ES5 one |
Using ES5 gives a slightly dated feel, and ES6 features like arrow functions aid readability and fit great with a functional style. Compare:
Or even with destructuring (this may be overkill, though):
|
+1 for second edition ES6 fork, I wouldn't mind helping |
@DrBoolean Thanks for taking the time to write this book! +1 for the 2nd edition fork. I would also be interested in helping translate the examples. Has anyone started anything like this? If so, please post a link here so I can contribute. Thanks! |
I have created an es6 / es2015 fork: https://github.com/r-k-b/mostly-adequate-guide/tree/es2015 |
@r-k-b @christiantakle |
What you think about rewriting all the code examples in the book in ES6? It feels more functional than ES5.
The text was updated successfully, but these errors were encountered: