413 karma · joined January 11, 2015
It is probably that Android users usually do not receive updates, so they can't complain that updates made their phones slower.
> life.includes('girlfriend') // false
That are some depressing code examples, is the author ok?
> The advice to "touch the DOM as little as possible" stems from the fact that the DOM has so many performance pitfalls.
What are those performance pitfalls?The only ones I know are that if you read something related to the layout size (offsetHeight), it might cause layout recalculation. And obviously if you modify how element looks like (innerHTML, changing class, etc).
This doesn't seem like much (assuming I dit not forget something). The first one is not obvious through.
- I have not seen anyone using ScalaJS
- These two are probably fine alternatives to do frontend for Clojure/Scala shops, but outside of these circles, they do not seem to have much traction.
"There is plenty of languages which compile to JavaScript if you want a different style."
I hear this a lot, but when you actually look at the list, there is not much to choose from.- Dart - not used outside of Google.
- CoffeeScript - people are leaving this for ES6+, does not provide anything other than nicer syntax.
- TypeScript/Flow - is just javascript + types. This is bad because it doesn't solve any of JavaScript problems and good at the same time because it is easy to introduce incrementally and there are 0 problems with interaction with plain JavaScript code). This seems to be good enough for most people, as you mention.
- Elm - Second most promising ATM but not mature enough, you still need to fall back to JS for lots of the browser API. You need to buy into the Elm world 100%, simple stuff like creating an element and using JS library which will modify that element still requires hacks (my info might be out of date, last time I worked on Elm project was ~4 months ago).
- Reason - Probably the most promising because Facebook backs it, but nowhere near production ready. At least it seemed to me last time I checked - no tutorials, even installation was not straightforward and required some consultation with GitHub issues.
- the rest is in the toy/abandoned/not mature enough territory.
I mean how is
expect(2).toBeLessThanOrEqualTo(3)
more readable than assert(2 <= 3)
Especially when we have packages like power-assert (1)For other stuff, I just create my own promise wrapper (if I feel like that promise interface would be better), which is like 5 lines of code.
Q: Why aren’t you giving all this money to charity? A: Why aren’t YOU giving all this money to charity? It’s your money.
> I'm glad to hear so much excitement about async/await. However, Node v7 is based on V8 54, whose async/await implementation has some bugs in it (including a nasty memory leak). I would not recommend using --harmony-async-await in production until upgrading to V8 55
source: https://github.com/nodejs/promises/issues/4#issuecomment-254...
Const very rarely saves you from bugs and the bugs that saves you from are very easy to find and fix. On the other hand the time wasted by thinking where whether to write const or let and the time wasted by switching consts for lets (and other way around) outweighs the time saved by potentially preventing these easy to find bugs. To sum it up, if consts does not really provide any extra value, why not make your life easier and just use let everywhere.
It was from very senior c++ programmer, so I am not sure how well that translates to JavaScript.
So the most interesting part of npm4 release are the announced improvements that are coming in npm5 :)
2. Article seems to compare most popular frameworks, so no surprise Mithril didn't make it since more popular frameworks like Vue are also not on the list