Live data from Hacker News

TypeScript: a language for application-scale JavaScript development

typescriptlang.org

161–170 of 316 posts

Re: TypeScript: a language for application-scale JavaScript development

#161
post #15

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…

Ha! I think you may be on to something. I've always had a "fear of rejection" with the compiler and I tend to get more enjoyment when coding in Python, Lisp, etc..

Re: TypeScript: a language for application-scale JavaScript development

#162
post #57

All 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.

From my experience, "most" of those JavaScript developers who "hate JavaScript" are in fact front-end developers who hate writing JavaScript for websites, since they struggle daily with issues such as cross-browser compatibility and inconsistent DOM implementations, which have nothing to do with JavaScript at all, and can't be fixed by a different syntax.

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

#163

Earlier 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?

Well, for one, their git integration is just bad. Looks like it only supports https password auth. Also I would really miss markdown integration after a while.

Re: TypeScript: a language for application-scale JavaScript development

#164
post #4

Say 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…

I don't know when it happened but CodePlex got a makeover as well, it looks good.

Re: TypeScript: a language for application-scale JavaScript development

#165

What 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...

This is cool and I keep hearing its coming to coffeescript soon, but just the fact that the TypeScript website doesnt mention "debugging" or "source maps" anywhere on the front page is disheartening. Its more important than anything to me, yet its still just a "we'll get there eventually" priority for all these alternative javascript languages.

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

#166

It 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://…

Cool. It is quite expectable too, at least considering the capabilities of the C# type system :)

Re: TypeScript: a language for application-scale JavaScript development

#167

Earlier 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.

Yeah performance is another issue. But providing a type that compiles to a defined type that implements decimal representation would be very useful. GWT pulls off something similar by compiling the Java BigDecimal to a JavaScript equivalent.

Re: TypeScript: a language for application-scale JavaScript development

#168

It 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…

It's an open-source iniative - great ideas like this are best seeded and grown through a great community effort. You sound like you want to be given the whole tree.

Re: TypeScript: a language for application-scale JavaScript development

#169
post #4

Say 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…

This is an absurd and outrageous statement. Akin to the full pay glossy ads for oil companies in Vanity Fair with messages like "We care about people and nature".

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.

Post reply on HN