4 ms·
Do people typically prefer TypeScript over ES6?
by bouncing 8y ago
Do people typically prefer TypeScript over ES6?
- BMorearty 8y agoFrom what I've seen, yes. I'm a big fan of ES6 and I haven't been a fan of typed languages for a long time but I'm liking using TypeScript. So are my coworkers.
- dak1 8y agoSince we all tend to live in bubbles to some extent, do we have any numbers to back this up (like, # of repos/commits in each language on GitHub, or questions on StackOverflow)? I tend to view TypeScript similar to CoffeeScript — it brings to JavaScript some features from other languages that are convenient and preferred by a subset of frontend developers. It allows for experimentation in the language, and helps inform TC39 proposals. In time, I suspect support will coalesce around a specific TC39 process proposal to add type support, it will graduate to stage 3 or 4, get integrated into browsers and Babel, and enthusiasm around TypeScript will wane.
- dangoor 8y agoA flexible type system like that of TypeScript is pretty big and complex. It would take considerable time and effort to get that through TC39, I think. It could happen, but seems far off to me. For data, 46% of npm's survey respondents used TypeScript: https://blog.npmjs.org/post/180868064080/this-year-in-javascript-2018-in-review-and-npms https://blog.npmjs.org/post/180868064080/this-year-in-javasc...
- chaostheory 8y agoComing from a background of being comfortable with Ruby, Python, and Java; I started with ES6 a few years ago and moved over to Typescript last year. While ES6 makes Javascript much nicer, Typescript makes it way better and easier to maintain especially with a decent IDE. I already had a lot of respect for Javascript developers previously, but when I started developing node apps with ES6 it grew even more. I can only imagine the discipline needed to maintain large Javascript apps before ES6 and Typescript
- WorldMaker 8y agoThere's not really a competition between ES6 and Typescript because they are generally on the same side. Typescript is mostly just ES6 (ES2015) + Types. (It also supports ES2016 + Types, ES2017 + Types, and ES2018 + Types, and generally as TC39 proposals make it to at least Stage 3 Typescript adds support for them.)
- ggregoire 8y agoIt's a strange question. Writing in TypeScript is almost identical to writing in ES6. TypeScript is "just" ES6 with interfaces and static types. Do people prefer typed JavaScript over JavaScript tho? I know that I prefer typed JavaScript, especially to write long-term web applications or Node.js server applications, but I don't think there is yet an unanimous shift towards typed JavaScript.
- bouncing 8y ago> Do people prefer typed JavaScript over JavaScript tho? I'd like dynamic typing but without the implicit and dubious type coercion. Like Python.
- mhd 8y agoI'd prefer Eiffel or Oberon, but almost anything is better than ES6. I just wish there was some kind of standard library movement to coincide with it, but even MS seems okay with left-pad.
- iamjaredwalters 8y agoES5 is not better than ES6. So I prefer ES6 in that case.
- chaostheory 8y ago> I just wish there was some kind of standard library movement to coincide with it, I keep hearing this complaint, and at the same time I'm wondering why it's a big problem. So you can't find 3rd party libraries that are good enough to fill in the void from the lack of a good standard library?
- mhd 8y agoYes, pretty much. I don’t want to bikeshed elementary parts of the developer experience, never mind vetting all the teeny components or find replacements if dependency hell strikes, quality regresses or maintainers disappear. Given all the constraints, it’s highly unlikely that you find something consistent.
- chaostheory 8y agoSo you write your own standard library substitutes? Math, functional, etc...?
- RobertKerans 8y ago> even MS seems okay with left-pad That's a strange choice of example to highlight the sparseness of the standard library.
- mhd 8y agoI thought it's a good illustration of how fractured and fragile the JS "library" situation is. It's a bit like the previous PHP standard library, combined with the worst of Perl's Tim Toady.
- diminish 8y agoNoone around me does. Typescript and JSX are the two ugliest tech to become fashionable recently. I suspect C#, or .NET developers find it familiar, and they've just joined the front end wagon.
- ng12 8y agoI've had the opposite experience. I don't know anyone not writing Typescript.
- irrational 8y agoI don't know anyone using it either (and I work for IT in a Fortune 100 company). But there must be since I keep seeing people mention it.
- cphoover 8y agoI'm a fan of functional programming over OOP as such, I don't need all of the OOP constructs just give me some immutable primitives, first-class functions and let's get to work. There's not much I can do with a class that can't be accomplished with a simple function. I think I've evolved in my thinking over this in the last several years of experience.
- fold_left 8y agoYou can continue to code the way you've been enjoying, just with the option to type your inputs and outputs if you choose to. Writing classical OOP isn't imposed on you by TypeScript, nor do you miss out on anything by not writing classical OOP.