3 ms·
I think that it's outlandish and silly that ES6 doesn't have a safer, more sound philosophy about type systems, e.g. like the elegant and rational one in TypeSc
by jschrf 12y ago
I think that it's outlandish and silly that ES6 doesn't have a safer, more sound philosophy about type systems, e.g. like the elegant and rational one in TypeScript today.
The web needs increased consistency and cohesion in the HTML/CSS/JS triumvirate.
ES6 seems like a grab-bag of neat and fun new features that end up doing a whole lot of nothing for large projects that have to care about more tangible concerns than nicer ways to create anonymous objects.
Some of the new features of ES6 - Symbols, proxies, Object.observe, et cetera - seem to make it downright easier to write even more confusing code. Instead of increased rigor and tools for building better software, we get stuff like this:
let obj = {
["h"+"ello"]() {
return "hi";
}
};
obj.hello();
While I think it makes sense to stick with TypeScript for the foreseeable future, I do look forward to The Next JavaScript.
However, I can't help but wonder if that's due to a mild case of Stockholm Syndrome setting in.
- noiv 12y agoWhat's wrong with property names determined at run time?
- vertex-four 12y ago> Some of the new features of ES6 - Symbols, proxies, Object.observe, et cetera - seem to make it downright easier to write even more confusing code. Actually, they're things that actual users of javascript have been asking for (and implementing hacked-up solutions for) for a long time. There's a reason Coffeescript is often referred to as "a better javascript" and Typescript is considered its own thing. Javascript is a dynamic language, and will never make the transition to a static one. Its users don't want a static language - the people who want a static language are using things like TypeScript.
- arcatek 12y ago> Javascript is a dynamic language, and will never make the transition to a static one Never say never. Typed structures are a proposal, and what make you think that we'll never see flow types in the standard someday ? Javascript will always give the upper hand to dynamic typing, but I can see it becoming a kind of hybrid language, where both dynamic and static codes can coexist.
- colin_jack 12y agoI somewhat agree and consider moving to TypeScript a bit risky as it seems like it'll end up a niche but I do think sensibly added typing code improve JavaScript. I want better tooling support, refactoring support, intellisense...and languages like Dart/TS seem to me to have shown its possible to do this without throwing out the dynamic aspects.