Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Google Microsoft Programming

Google's Angular 2 Being Built With Microsoft's TypeScript 91

itwbennett writes Big news for fans of static typing! Google and Microsoft have partnered to both enhance TypeScript and rebuild Angular in the TypeScript language. TypeScript, Microsoft's attempt at improving on JavaScript development, has been out there for a while without a notable use case. Likewise, Dart, Google's attempt at a language which accomplishes many of the same goals, hasn't seen a lot of traction outside of Google. With Google creating the next version of its popular framework Angular 2 using TypeScript, some weight is being thrown behind a single effort. Of course, Angular has its fair share of haters, and a complete re-write in version 2 that breaks compatibility with previous versions isn't going to help matters.
This discussion has been archived. No new comments can be posted.

Google's Angular 2 Being Built With Microsoft's TypeScript

Comments Filter:
  • Yes @ script is a superset of Typescript and it will be used in Angular 2. Not really a hot news story.

  • by Anonymous Coward

    So what exactly is angular?

  • by Anonymous Coward

    So why should I start using this, when Google has a history of abandoning their projects after a couple of years?

  • by Anonymous Coward

    Angular is the shit. My term for web development with JavaScript pre-Angular (and similar tools) was "Web Assembly Language" (WAL). It was so fucking tedious, it took so much work do do simple shit, etc...

    Angular isn't for every project, just like sometimes you have to be the poor fucker writing assembly language for some very narrow cases. But for most projects it (and tools like it) are the shit.

  • Otherwise my client isn't interested

  • A year ago they were slowing work on AngularJS to put more effort into a complete rewrite with AngularDart.
    Dart is a better language than TypeScript and it's a Google creation... I have no idea why they did this.

    • Actually they will be writing it in typescript which will compile to both AngularJS and AngularDart projects. Two birds with one stone. It is pretty awesome actually...
    • Yet, there are very good reasons... - JavaScript is improving, making Dart-JS useless. The best part of Dart are only supported by Chrome. - TypeScript compile JS to any browser not just Chrome. Angular working only on Chrome would become irrelevant.
    • TypeScript is a strict superset of JavaScript (in fact, the only thing it adds on top of ES6 is static type annotations - strip those from the AST, and you've got valid ES6 code with same exact semantics). Dart is not.

    • by DrXym ( 126579 )
      Typescript is balls as a language (for all the reasons JS is) but it's succeeding probably because it's familiar to JS / AS devs and static typing is a good thing. So you can reuse existing JS code and there are TS definition files for most popular JS libs too. So better than JS but still suffering from many of the same issues - strict model, weird binding rules etc.

      What is ironic that the two leading JS replacements actually manage to be orthogonal - Typescript adds extra verbiage and Coffeescript attemp

  • by tgv ( 254536 ) on Thursday March 12, 2015 @02:34AM (#49239413) Journal

    I don't care about Angular. It's just another tool for the saps in the web page mines (and one that can get you trapped in those mines as well).

    TypeScript, OTOH, is the greatest addition to JavaScript I've seen. No more messy .prototype., and much less "can't read property 'x' of undefined". It's not there yet, I must say. I would like it to add some more transformations instead of just type checking, but if you have to write in JavaScript: do yourself a favor, and check it out.

    • I would like it to add some more transformations

      If you mean syntactic sugar, then it has plenty: classes and modules and arrow lambdas (which capture "this") are two prominent ones. TS 1.4 adds a bunch more, like "let". And yes, everything in TS other than type annotations and their checking is basically ES6; but TS can compile those things down to ES5.

      • by tgv ( 254536 )

        Not just syntactic sugar. I would like something like the implicit lambda from Java, like this: people.sort(Person::getLastName); instead of having to write people.sort(function(p: Person): string {return p.getLastName();}). There are one or two other practical thingies in Java and C# that could be easily translated to JS too.

        For type checking, I would like private/public and const, too. I hate const, but sometimes it's the best.

        • Do you really need that sugar for lambdas, if you can write people.sort(p => p.getLastName())? It doesn't really save you all that many keystrokes...

          "const" is actually coming in TS 1.4 (as another ES6 feature - it's paired with "let"). "private" and "public" are already there (and have been since 1.0).

          • by tgv ( 254536 )

            It's not the keystrokes, it's just an obvious and safe transformation. If all we cared about was number of keystrokes, all our code would be candidate of the Obfuscated C contest.

            > "const" is actually coming in TS 1.4

            That's not the const I meant: I would like to see const members and parameters. The 1.4 const is for declaring static constants only, and requires ES6, it seems.

            Sorry about private and public. I must have forgotten about them...

    • > No more messy .prototype
      I kinda like prototype based object orientation, but of course in the hands of someone dangerous it is far worse than classes.

      > "can't read property 'x' of undefined"
      Failure to initialize a variable, all dynamic languages have this problem in spades and it is somewhat common in static typed languages that allow a null value as well (NullPointerException, seg-fault...)

      One thing I do hate about javascript is how there is both null and undefined, you end up needing to

      • by tgv ( 254536 )

        > I kinda like prototype based object orientation

        TypeScript uses just that, but it just reads better.

        > Failure to initialize a variable, all dynamic languages have this problem in spades

        Static typing can prevent that. Typescript warns against passing a wrong argument, or getting a non-existing member, which cause a lot of the "can't read property" errors.

  • What major Google product uses Angular?

    • by Anonymous Coward

      google trends
      youtube for ps3

  • Anyone can point the cool things that one have and the other doesn't. Sure static typing is nice and all but I rather dislike static typing for big iterative projects, refactoring static typed code is a pain in the ass. Yet at the same time static typing makes a lot easier for a new dev in a big project to start being productive without breaking the whole thing (although test-driven development in dynamic typing languages help a lot in this regard).

    Also how are the tools for typescript? Having static typing

  • He really does have the knack for programming language design. I didn't get TypeScript at first, but with 1.4, it clicked. The great news about this is that Angular is a highly visible framework, and with this, more people will look at TypeScript and be willing to use it. Thanks to type definition files and, you can use a ton of JS libraries right now; hopefully, more people will officially maintain these files.

    Also, this makes it easier to recommend it's use in work projects. Being able

Thufir's a Harkonnen now.