Live data from Hacker News

Angular 2: Built on TypeScript

blogs.msdn.com

51–60 of 235 posts

Re: Angular 2: Built on TypeScript

#51
post #39
post #3

This isn't really a big jump, as they were using AtScript before which was really just a forked TypeScript: https://docs.google.com/document/d/11YUzC-1d0V1-Q3V0fQ7KSit9... They must have convinced Microsoft to accept their patches into mainline TypeScript.

Nope, AtScript was doing runtime type checking (AtScript is basically traceur with some experimental features) while Typescript DOESNT. To be fair , I don't care, but that's an important precision. It means that the Angular team is giving up on traceur or maybe traceur and typescript will merge somehow in the future.

Of note, the BRAND NEW TODAY angular website still says it uses AtScript: https://angular.io/docs/js/latest/quickstart.html

ES6, AtScript, and the es6-shim AtScript

Angular is built with AtScript. AtScript is an extension of ES6 (ECMAScript 6), the new specification of the JavaScript language. This quickstart features AtScript, but you can write Angular in ES5 or ES6 as well. ES6

AtScript compiles to ES6, which is not widely supported in all browsers today. The es6-shim.js file allows you to use ES6 or AtScript in the browser. es6-shim

The quickstart repository includes es6-shim.js. The es6-shim.js file includes dependencies (such as Traceur) needed to compile ES6 in the browser. Traceur is an ES6 compiler that transpiles ES6 to ES5 code.

Re: Angular 2: Built on TypeScript

#52

Earlier quoted context omitted.

No Dart compiles to JS. Obviously there is some overhead with transpiling languages, but it's actually pretty small. They have done a good job with it.

Yes Dart compiles to javascript, but it has pretty different semantics from javascript and needs to insert extra javacript to get your transpiled javascript to run. For example, noSuchMethod isn't available in all js engines so using https://www.dartlang.org/articles/emulating-functions/#inter... in dart would require a non-trivial amount of wrapping code to be generated. http://stackoverflow.com/questions/8815437/wh…

> And the size of helloworld.dart.app.js is 102k

No, it's not.

  dart2js --minify hello.dart -o hello.dart.js
Results in a 5 KB JS file.

This game is 35 KB (procedural graphics included):

http://mbtic.com/games/fuzetsu

Re: Angular 2: Built on TypeScript

#53
post #19

Earlier quoted context omitted.

I am pretty sure that TypeScript just adds type safety and is optional. I don't see this as a huge negative and I actually see this as a positive. Just curious, what and why are all your reasons to move away from Angular?

If type safety was the issue, couldn't they have tried Facebook's Flow[1] which believe would have reduced the technical overhead by large? [1]: http://flowtype.org/

TypeScript has been around longer, and is more widely used.

FWIW, the Angular team mentioned they talked with the Flow team - not sure what that will mean in the near term, but I get the impression that efforts might be in progress to unify the different libraries' efforts.

Re: Angular 2: Built on TypeScript

#54
post #46

I don't care what people say Angular totally suffers from the second system effect. http://en.wikipedia.org/wiki/Second-system_effect

> The second-system effect is the tendency of small, elegant, and successful systems to have elephantine, feature-laden monstrosities as their successors due to inflated expectations.[1]

Angular 2.0 is removing a lot of complexity and "magic" of 1.x. I've moved onto React but I think it's a bit too soon to say Angular 2.0 will be a bloated monstrosity relative to 1.x.

Re: Angular 2: Built on TypeScript

#55
post #19

Earlier quoted context omitted.

I am pretty sure that TypeScript just adds type safety and is optional. I don't see this as a huge negative and I actually see this as a positive. Just curious, what and why are all your reasons to move away from Angular?

- Breaking changes - Obtuse, verbose, non-performant code - Did I mention breaking changes?

On the other side, the ember guys released a drop-in update.

Re: Angular 2: Built on TypeScript

#57

Earlier quoted context omitted.

Dart requires loading a dart runtime js file on to the page, as far as I know. And I think they would claim Typescript is javascript + some extra stuff on top, whereas dart is a whole new language to learn.

No Dart compiles to JS. Obviously there is some overhead with transpiling languages, but it's actually pretty small. They have done a good job with it.

Dart can be run in both modes. Chrome (dunno if enabled by default and/or in stable) contains a Dart VM, so you "only" need to transpile into JS for non-Chrome.

The main problem I had with Dart was [a year ago] that using existing JS libraries like jQuery wasn't as seemless as I would liked. So that would be a reason against Dart, if Angular wants to make that aspect easier.

Haven't looked at TypeScript's interop with JS. I got frightened by the name Microsoft and the fact that they only had a huge language spec PDF and not a single tutorial or something easier to digest.

Re: Angular 2: Built on TypeScript

#60
post #39
post #3

This isn't really a big jump, as they were using AtScript before which was really just a forked TypeScript: https://docs.google.com/document/d/11YUzC-1d0V1-Q3V0fQ7KSit9... They must have convinced Microsoft to accept their patches into mainline TypeScript.

Nope, AtScript was doing runtime type checking (AtScript is basically traceur with some experimental features) while Typescript DOESNT. To be fair , I don't care, but that's an important precision. It means that the Angular team is giving up on traceur or maybe traceur and typescript will merge somehow in the future.

I don't see why anyone would want runtime type checking the way AtScript does it.

With static typing, the compiler can catch type errors early, at the cost of rejecting some otherwise valid programs.

With dynamic typing, that type checking is delayed until execution time. More programs are valid, but type errors are caught late.

With AtScript-style late type checking, they took the dynamic type system and introduced more type errors. This decreases the amount of valid programs, yet catches no errors at compile time. It does nothing but increase the amount of bugs.

Post reply on HN