Posted
by
samzenpus
on Wednesday March 11, 2015 @04:22PM
from the if-you-build-it-they-will-type dept.

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.

It would appear you're not a web applications developer, then. AngularJS is a leading framework for web app development, and TypeScript is suddenly the most likely language to emerge from the pack of "front-end-statically-typed-languages-that-compiles-to-Javascript". If you're not doing web apps, you don't care, but lots of people will.

Yes, it "worked out" with Microsoft opening up Entity Framework, ASP.Net, vNext,.Net, C#, F#, Typescript and a host of other things, on the industry standard platform for open source projects, GitHub, using the industry standard SCM for open source projects, git.

How did it "work out" in your mind? Because from where I'm standing, open source won, it embraced and extended MS...

MS can also be seen as embracing (everything you listed and then some) and extending (MSPL) open source, all it needs now is to find a legal route to extinguish and it's won.

You have a very odd definition of "won", I don't think any company would consider going through the process of developing products, getting people to use them, releasing them as open source and then somehow killing them off and then proclaiming "yes we won!"..."won" what?

And it too will have its own way of doing things that nothing else does, just like Angular and React are right now. At least jQuery was open from the beginning that devs should know the language that it mostly shielded them from. Now it doesn't seem to matter; job postings are mainly for those who can write , not JavaScript. Don't know the particular framework du jour (or preferably *all* of them)? Tough.

Release 0.9.0 of Angular was 52 months ago and the appearance of the next framework that topples it will be the first. As a web developer, if you haven't actually used Angular for at least experimental purposes by now then you're an old fogy that's likely to get canned for someone more current.

Angular 2.0 won't trip up anyone and going with Typescript was a smart and pragmatic decision; the Angular team does not indulge NIH, apparently. That sort of humility and wisdom is both rare and a big part of the reason Angular remains popular. The tools that typical Angular developers use already integrate Typescript declarations for auto-complete, detecting errors, etc., and now that will just get stronger.

Google could have used their momentum and mind share to bull AtScript into yet another Javascript hairball. They could have and they didn't. That deserves acknowledgement.

So Typescript is the way. Microsoft has actually managed to contribute something they can't monetize to the modern web stack. How times have changed.

I haven't used Angular for pretty much anything. I've used Ember, though, because someone else on the team liked it. I mostly do server-side development anyway. I mostly just leave the client-side stuff to the colored-pencil jockeys.

I despise Javascript and wish it would die a horrible, ugly death, allowing something not completely made of shit to take its place.

It's not a complete loss. Virtually all of these frameworks are doing the same damned thing and implementing the same damned patterns just with different code. And underneath Angular or WhateverReplacesIt will be the usual heap of JS libs - JQuery, Underscore, Backbone et al. So knowledge is transferable even if AngularJS stops being fashionable.

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.

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.

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.

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

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.

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.

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.

> No more messy.prototypeI 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

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

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 definitelytyped.org, 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