Live data from Hacker News

TypeScript: a language for application-scale JavaScript development

typescriptlang.org

21–30 of 316 posts

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

#23
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.

No, we have not. Read John Carmack's posts on static code analysis to understand why.

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

#26
This looks nice. I love the fact that there's no runtime that needs to be included or any overhead when the compiled JS runs.

It'd be 100% more useful if it was more aware of nullable types -- as it is, it appears that

    null * 7
compiles without any error messages. If they add a "nullable number" type distinct from "number", I'll be a lot more likely to use it.

It also appears that some other things compile that perhaps shouldn't, such as

    7[2]
and

    7["a"]
even though (7).a is equivalent and (correctly) fails to compile.

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

#27
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.

Like spaces vs. tabs, braces vs significant whitespace, there is, and never will be, no such consensus.

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

#29
post #18

Back in the day, Microsoft would use a strategy called "embrace, extend, extinguish." http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish Recently, Microsoft has been pushing Javascript very hard (embrace) and now it looks like they've started the "extend" phase. Luckily, no one really worries about them being able to pull off the "extinguish" part anymore... they just don't have enough market power these day…

TypeScript is as likely to extinguish JS as ASP is to extinguish HTML.

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

#30
post #18

Back in the day, Microsoft would use a strategy called "embrace, extend, extinguish." http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish Recently, Microsoft has been pushing Javascript very hard (embrace) and now it looks like they've started the "extend" phase. Luckily, no one really worries about them being able to pull off the "extinguish" part anymore... they just don't have enough market power these day…

You're wrong "extend" is when you add features to a standard that are not part of the standard. Since this only compiles to JavaScript and isn't being built into IE, it doesn't qualify. Dart does, though.
Post reply on HN