I've written a lot of JavaScript, including large-scale projects, and never once have thought, "Gee, I wish I had type checking." Haven't we come to a consensus that types are more trouble than they're worth? They hurt clarity and catch few bugs.
I have a theory about this - how you feel about static typing is related to whether you see the compiler as your friend or as your enemy. If you see the compiler as your friend then you tend to like type checking because it blocks certain bugs and typos. It won't let you run your code until they're fixed. If you see the compiler as your enemy, as a barricade that you need to get past, then you tend to not like static…
TypeScript: a language for application-scale JavaScript development
161–170 of 316 posts
Re: TypeScript: a language for application-scale JavaScript development
#162All of these compile-to-JS efforts are great, and as much as I love things like CoffeeScript I have to say I definitely worry about language fragmentation. JavaScript is full of flaws, but its monopoly in the browser space has brought about one intriguing and welcome side-effect: a VERY efficient market for both employers and employees. It's easy to overlook how important this common denominator has been for everyone…
Javascript is dreadfull , and its flaws are counter productive and intolerable. It has good things like closures and first class functions , and that's it. Most of js developpers hate javascript , but are forced to work with it. So they dont care what they use as client language provided it gets the job done. few people cares about Javascript. most of the devs hate it. But the browser as dev plateform is a fact.
It's also compounded because the majority of front-end developers write their code procedurally for each application component, which creates a terrible nest of repetitive and error-prone code.
They feel the pain, don't know how to solve it, so switch to a different syntax, blaming that as the root cause of the problem.
But feeling enough pain to viscerally HATE a language, as many front-end developers do, is not something that can simply come from the syntax of the language and the fact that the equality operator does type conversion and whatever small list of gripes users have. Most other languages (including CoffeeScript!) have a similarly-sized set of flaws and aren't nearly as derided.
Re: TypeScript: a language for application-scale JavaScript development
#163Earlier quoted context omitted.
Interesting. Worth noting that the Azure SDK [1] was released on GitHub over a year ago with the same attributes. The move to Codeplex is concerning. [1] https://github.com/WindowsAzure/azure-sdk-for-node
> The move to Codeplex is concerning. What's concerning about moving the location where Microsoft hosts their code?
Re: TypeScript: a language for application-scale JavaScript development
#164Say what you want about whether this is a good idea or not, it is clear at least part of MS is really serious about open source. * TypeScript is under the Apache 2.0 license [1] * Source is available via git on Codeplex [2] * Installation is as easy as npm install -g typescript [3] Extra bonus coolness: They've provided an online playground like jsfiddle! [4]. [1] http://typescript.codeplex.com/license [2] http://typ…
Re: TypeScript: a language for application-scale JavaScript development
#165What about debugging? Thats my biggest problem with coffeescript How do they map errors thrown in the browser, to TypeScript code? If this has things like classes and such, the relationship isnt always going to be 1:1 and debugging can become a nightmare. Part of what makes javascript so great is how easy it is to debug. All these "superset" languages that compile to javascript fail hard @ debug support usually
Source maps[1] should help with this. [1]: http://www.html5rocks.com/en/tutorials/developertools/source...
I would think microsoft wouldnt want to release this until source maps were tested, working and included as part of the language as a major bullet point feature. These languages are nothing but a novelty to use in prototyping until that happens. I'll never use any of these languages in my production development workflow until proper debugging is available.
Re: TypeScript: a language for application-scale JavaScript development
#166It looks really good for a first release. The focus on tooling is IMO the most refreshing thing about the project; the playground is great! I haven't dug much into it yet, but there are a couple of annoyances that i noticed in the playground that i wish will be corrected/alleviated somehow: - The language is not expression-oriented. Once i got used to the "everything is an expression" mindset in languages like Coffee…
TypeScript will eventually support generics, as per the spec [1]: NOTE: TypeScript currently doesn’t support Generics, but we expect to include them in the final language. Since TypeScript’s static type system has no run-time manifestation, Generics will be based on “type erasure” and intended purely as a conduit for expressing parametric type relationships in interfaces, classes, and function signatures. [1] http://…
Re: TypeScript: a language for application-scale JavaScript development
#167Earlier quoted context omitted.
This is great to hear. I have only just started reading up on TypeScript. But I would love to know if there will be support for a decimal type. I have been following Google's work on Dart and it doesn't look like they will be implementing it last I checked. Such a feature would be a great differentiator.
A team member could comment better than I, but unless TypeScript adds some kind of operator overloading, supporting a new type would be difficult since it compiles to normal JavaScript. Even then, creating a performance decimal type without native code support might be difficult.
Re: TypeScript: a language for application-scale JavaScript development
#168It seems to me that the type checking in TypeScript is extremely limited compared to what the Closure Compiler supports. The examples only show simple `fooInstance : Foo` examples, whereas Closure supports function prototype validation and such, a la C. I will need to see more elaborate examples. Granted, there is no documentation that I could find on the website. I understand that this is a "preview," but I disagree…
Re: TypeScript: a language for application-scale JavaScript development
#169Say what you want about whether this is a good idea or not, it is clear at least part of MS is really serious about open source. * TypeScript is under the Apache 2.0 license [1] * Source is available via git on Codeplex [2] * Installation is as easy as npm install -g typescript [3] Extra bonus coolness: They've provided an online playground like jsfiddle! [4]. [1] http://typescript.codeplex.com/license [2] http://typ…
M$ is serious about embrace, extend, extinguish. M$ is not serious about supporting the computing community, is not serious about creating powerful platforms, and has gone out of its way to serious damage the knowledge economy.
Microsoft will destroy this technology just like it destroys everything it touches. Microsoft is the Chuck Bass of computing. If you get that reference, you are probably looking at someone else's computer right now.
The thing you see in front of you is, perhaps 10% Microsoft and 90% the work of a small number of dedicated individuals. Microsoft has shown a track record of destroying good technology and ignoring the community standards process.
I sincerely hope that someone rips this idea off and liberates it from Microsoft. Typed JavaScript is not patentable or copyright-able, and Google beat the daylights out of Oracle over Java, so I think this is fair game.
tl;dr I give this project 18 months before the M$ business machine starts using TypeScript as a weapon.