OpenUserJS.org icon indicating copy to clipboard operation
OpenUserJS.org copied to clipboard

Consider ES6+ migration

Open Martii opened this issue 7 years ago • 1 comments

The project is currently ES5.1 and it would be helpful to migrate so we can use some more features.

  1. Some of the CONTRIBUTING.md guidelines would need to be changed... especially regarding "hoisting" since the let syntax would change if it was coded hoisted. We are using some let syntax already for speed/memory considerations in key code points.
  2. I am totally not into the arrow operator and it actually makes code more difficult to read and improves laziness. :-1:
  3. With the recent issue at #1548 it may be prudent to dump async at some point since async and await exist. There are a few other technologies too but Promises are also a :-1: from me.
  4. I do like callbacks but when combined with our current site issue and async it seems to be error prone. Perhaps a combination of these to be allowed in CONTRIBUTING.md

While I'm at #1548 I'll do some pro tests to see how well it handles that soon after the holidays.

Open to discussion here.

Martii avatar Dec 20 '18 04:12 Martii

Note:

  • #1709 deprecation of request may force some async/ await usage i.e. promises. mongoose uses system promises and we have some .then, .catch syntax already.

Ref(s):

  • https://nodejs.org/api/util.html#util_util_callbackify_original

Martii avatar Feb 13 '20 23:02 Martii