Skip to content
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

no-sync #144

Closed
eliasmalik opened this issue Sep 20, 2016 · 8 comments
Closed

no-sync #144

eliasmalik opened this issue Sep 20, 2016 · 8 comments

Comments

@eliasmalik
Copy link
Contributor

http://eslint.org/docs/rules/no-sync

There are contexts where sync operations are acceptable and reduce indentation, e.g. in tests or while performing server setup.

no-sync: "off"
@jedwards1211
Copy link

@eliasCodes personally I just use async/await instead of sync ops these days

@eliasmalik
Copy link
Contributor Author

Hi @jedwards1211, in goodparts, we're trying to avoid features that don't have good browser support and require transpilation. You might notice that we set the ecmaVersion: 5 in our eslintrc.js for this reason. Unfortunately this means we can't use async/await, nice though they are. For another example, see #221

@jedwards1211
Copy link

Oh, I see. ES6 will be standard soon enough ;)

@nelsonic
Copy link
Member

nelsonic commented Nov 5, 2016

@jedwards1211 ES2015 is already a "Standard" which is great! 🎉
However that does not mean that these new features available everywhere. 😞
It's like proclaiming USB-C is the "standard", it does not mean all devices/peripherals have it.
And unless you want to use "dongles" ("polyfills" / "transpiler") during the "transition period" it's way easier to stick to what already works. (and then hopefully leapfrog the intermediate step completely like going from PHP straight to Node without doing 3 years of RoR/Apex... 😉)

We are actively investigating elm-lang as an alternative to "Transpilation" of ES6/7/8/etc ...
see: dwyl/technology-stack#27

@jedwards1211
Copy link

jedwards1211 commented Nov 5, 2016

Elm is interesting, gaearon cited it as an inspiration for Redux. But it does require transpilation too, to use in the browser at least.

Personally I find using ES6/7 easier than ES5, even with the added work to set up babel transpilation. And to deal with that, I just created project skeletons that have everything set up that I use: babel, eslint, flow, mocha, istanbul, etc:
https://github.com/jedwards1211/es2015-library-skeleton
https://github.com/jedwards1211/react-library-skeleton

@nelsonic
Copy link
Member

nelsonic commented Nov 6, 2016

@jedwards1211 Your project skeletons look like good starting points. 👍
What your devDependency list highlights is that you have learned a lot of different things to get to where you are now ... 📚
BTW: props for your crater project really well thought out. 😉

yeah, Elm requires compilation but that's where the similarity to ES6/Babel ends. 😉
the elm compiler is smart and shows really useful "error" messages. 😖 ... ⌛️ >> 😂
The debugger is fantastic and the language its' self is microscopic by comparison to ES2015. 😍
I'm not "sold" on Elm, yet. Because there is a lot to learn and questions to be answered. ❓ 🤔
But it's come a long way since we checked it out last year so I've decided to #MakeTime for it: https://github.com/dwyl/learn-elm/issues #discuss

@jedwards1211
Copy link

jedwards1211 commented Nov 6, 2016

Yeah it was definitely a lot to learn and would be horrible for people who are just learning to program. And the amount of things added in ES6 is kind of staggering to me, there are a lot of features I never use.

@nelsonic
Copy link
Member

nelsonic commented Nov 7, 2016

@jedwards1211 the sheer amount of learning that is required before people can even begin to contribute to a code project with the React-Redux-ES6 stack is staggering and most people take it for granted. But we constantly try to "see the world through the eyes of a complete beginner". #shoshin

If I was learning how to code today I would spend a (few) week(s) learning JS, build a couple of demo apps and even consider learning a framework or "view" library or two; but then I would learn elm for one of these reasons: dwyl/learn-elm#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants