5 ms·
I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever fun
by tabeth 10y ago
I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript.
You can already see the conflict happening as some people prefer Flow and others TypeScript. Perhaps later Google will throw their hat into the ring and introduce GScript. Then, you have three different languages that introduce similar functionality, that all transpile into JavaScript.
Sound familiar?
- smt88 10y agoJavaScript changes slowly, and adoption of its changes is even slower. TypeScript has the major benefit of working now. Also, TS is a superset of JS, so the fact that it's a different language isn't really problematic.
- manojlds 10y agoAngular 2 was written with TypeScript.
- oblio 10y ago> I haven't used TypeScript extensively, but I feel that there should be more of a push (maybe there is, please correct me if I'm wrong) to introduce whatever functionality people deem worthy that exists in TypeScript and introduce it to JavaScript. There is a huge push going on. But Javascript has a consensus driven community: all the big players involved have to agree on something for it to be adopted (Google, Apple, Microsoft, Mozilla, etc.). Plus, even when it's adopted there's usually a 2-5 year delay before mass diffusion.
- deleted 10y ago[deleted]
- mixedCase 10y agoGoogle already has Dart.
- trimbo 10y ago> Perhaps later Google will throw their hat into the ring and introduce GScript Google had one called Atscript, but rallied Angular 2 around Typescript instead. http://sdtimes.com/google-microsoft-combine-typescript-atscript-angular-2/ http://sdtimes.com/google-microsoft-combine-typescript-atscr...
- stupidcar 10y agoThe Angular team also managed to get TypeScript approved as a new language for internal development at Google, joining a pretty short list (Java, C/C++, Python, JavaScript, and Dart I believe). All the others were apparently decided by fiat in earlier days then grandfathered in. TypeScript is the first, and so far only, language to successfully go through the official approval process. I feel like we're going to see a big increase in TypeScript related activity from Google in the next couple of years, due to this.
- reducesuffering 10y agoI believe Go would also be an approved language for internal development.
- recursive 10y agoThe flagship feature of TS is static typing. That will never exist in JS.
- Lio 10y agoI'd never say never. As I'm sure you're aware, JavaScript has had statically typed arrays since WebGL was introduced. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays https://developer.mozilla.org/en-US/docs/Web/JavaScript/Type...
- WorldMaker 10y agoES4 the version of JavaScript that time mostly forgot (except for Adobe and ActionScript) had static types that looked rather similar to Typescript/Flow. It's not impossible that it will be revisited. Especially now with the precedent from Python of defining/standardizing no runtime behavior for it, only syntax acceptance; that seems like something browsers might be more okay with versus the runtime behaviors required/encouraged by ES4.
- recursive 10y agoIt has typed arrays, but they're still not statically typed. In a statically typed language, this would not run. console.log("hello"); typedArr[0] = incompatibleType(); In javascript, it will produce "hello" as output, and then a run-time failure.
- goatlover 10y agoThey got class stuff into the language, and that was no small feat (very contentious issue), even if it is still syntactic sugar over prototypes.
- tantalor 10y agoIf you just want type checking for JavaScript, use Closure Compiler: https://developers.google.com/closure/compiler/ https://developers.google.com/closure/compiler/ Code checking. The Closure Compiler provides warnings for illegal JavaScript and warnings for potentially dangerous operations, helping you to produce JavaScript that is less buggy and easier to maintain.