3 ms·
Original author here - thanks! Yes, ES5 is a huge pain. However, I believe 5% of users (see other comment) are not a joke for many apps. There's always the ques
by morrvs 6y ago
Original author here - thanks! Yes, ES5 is a huge pain. However, I believe 5% of users (see other comment) are not a joke for many apps. There's always the question of minimum critical APIs required: If you build a 3D or webcam app you can forget ES5 altogether, of course.
> It’s a lot like using polyfills when needed.
Never thought of it this way, thanks for that! As is state in the conclusion, the study would likely be more convincing with ES6 and build steps. So yeah, ES5 is questionable :)
- jeroenhd 6y agoI very much appreciate proof that we don't need modern frameworks as much as people claim we do. As for ES5 support, would you consider using something like Babel to be close enough to using polyfills to consider them? Transpiling ES6 into ES5 fixes your compatibility issue with ES6 just like I would argue adding a polyfill for WebP images would.
- morrvs 6y agoThanks, although I wouldn't claim it to be "proof" :) and yeah, the choice of ES5 vs. ES6 seems to be a major weakness of the study as others here have said as well. In any case I believe switching the current product to ES6 would make the results even more convincing.
- DarkWiiPlayer 6y agoPartly I agree, 5% of users is a lot. However, this number will only continue to decrease as time goes on, and it also has to be questioned for any specific product whether that number is bigger or smaller on average. Both for the (near?) future when ES6 is near-universal and for projects that have the luxury of just ignoring older browsers even today, it would be nice to have a proof of concept project like this that uses modern ES6 features, since many of them address precisely the types of problems that many pre-processors also fix. Template-strings, custom elements, etc. add a huge amount of possibilities for web-application development and imo should get way more attention outside of a small circle of excited people.
- morrvs 6y agoCompletely agree. In hindsight the choice of ES5 is questionable and in the study I actually conclude that another ES6-based experiment is desirable. Also, as others here have noted, you could start with ES6, see if it works for enough of your users, and only if not orthogonally introduce transpilation to ES5 as a production optimization.
- runarberg 6y agoMost of the websites I write these days don’t have a build step for development, only for production. Modern browsers (and modern node) support ES modules, so there is no need to build anything until you ship to a legacy browser. The only pain point of not building during development is when I need to pull in a third party dependency (since node and browsers pull from different sources; and import-maps is not is still not a standard), but if your are not using any third party dependencies, you should be fine.
- lenkite 6y agoThose 5% of users will need 95% of your support capacity. Best to kick them to the curb until they upgrade.
- earthboundkid 6y ago5% is not a realistic number for ES5. 1% of users are IE11 and the other 4% are weirdos like Opera Mini that won’t work no matter what JS you use.
- earthboundkid 6y agoLike most people who use ES5, your code is broken in IE11 and you had no idea. :-) You use Object.assign(state, next) which does not work in IE11. Using ES5 is pretty much always a mistake in 2020.
- datagram 6y agoObject.assign is polyfilled: https://github.com/morris/vanilla-todo/blob/9a27e850e15fddfe0e9504660f516d51d31e5284/public/index.html#L29 https://github.com/morris/vanilla-todo/blob/9a27e850e15fddfe... That being said, the page still didn't load properly for me when I actually tried it in IE11, but it's not because of Object.assign. Nobody writes ES5 because they want to; many developers are still forced to support Internet Explorer for one reason or another.