Live data from Hacker News

TypeScript: a language for application-scale JavaScript development

typescriptlang.org

11–20 of 316 posts

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

#12
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…

The online playground can do live syntax and type checking as well as provide function call hints. That's pretty cool.

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

#13
post #8
post #5

Now I want to take an advantage of strict typing at runtime, which is obviously not possible, because instead of standardizing a VM all vendors are doing stupid things like this.

I'm willing to bet MS has built runtime type support into the Chakra VM. The question is whether they will do it in a propitiatory way or push it as an extension of ECMAScript and try to get other VMs to implement it.

The worst thing is that they already have the runtime that is language-agnostic, performant, has a great standard library and so on. When they tried making it available on the Web, the so-called "open stadards" won. Which are in fact a bag of shit.

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

#14
Weird that I didn't spot a friendly list of features.. seems to have some cool ones, like a shortened function expression (from the doc PDF):

    (x) => { return Math.sin(x); }
and modules, which are implemented using the immediately invoked function expression pattern:

    module M {
      var s = "hello";
      export function f() {
        return s;
      }
    }
Syntax seems more clear than CoffeeScript and tool chain will probably shape up better. Looking forward to seeing this get some traction.

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

#16
post #8
post #5

Now I want to take an advantage of strict typing at runtime, which is obviously not possible, because instead of standardizing a VM all vendors are doing stupid things like this.

I'm willing to bet MS has built runtime type support into the Chakra VM. The question is whether they will do it in a propitiatory way or push it as an extension of ECMAScript and try to get other VMs to implement it.

On the Techcrunch article also posted to HN recently, the designer said they would not be baking TypeScript into Chakra, but rather letting it compile to JS and running it the same way everywhere.

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

#17
post #8
post #5

Now I want to take an advantage of strict typing at runtime, which is obviously not possible, because instead of standardizing a VM all vendors are doing stupid things like this.

I'm willing to bet MS has built runtime type support into the Chakra VM. The question is whether they will do it in a propitiatory way or push it as an extension of ECMAScript and try to get other VMs to implement it.

The TechCrunch[1] article states otherwise:

"Asked whether Microsoft might do something to prioritize TypecSript in Internet Explorer, Lucco, the chief architect of IE’s JavaScript rendering engine Chakra, says no."

[1] http://techcrunch.com/2012/10/01/microsoft-previews-new-java...

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

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

EDIT: Yes, I conceede the fact that TypeScript is OS probably addresses most of these objections.

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

#19
Awesome, great to see this finally released. I'm a dev in FUSE Labs (http://fuse.microsoft.com) and we've been dogfooding TypeScript for a while now. I'd be happy to answer any questions about using TypeScript vs vanilla JS, converting a large codebase, etc.

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

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

> Haven't we come to a consensus that types are more trouble than they're worth?

Pretty sure we haven't. That shitty languages with shitty type systems are mor trouble than they're worth yes, but types?

Post reply on HN