Live data from Hacker News

Angular 2: Built on TypeScript

blogs.msdn.com

41–50 of 235 posts

Re: Angular 2: Built on TypeScript

#41

Why not Dart?

There is angular Dart, I'm sure there will be angular Dart 2. The problem of Dart , well have you ever seen some Dart code ? it's miles away from javascript. Have you ever seen some Dart2Js code ? It's heavy , megabyte heavy. Who's going to work with a framework that weight that much ,developped in a third party language ? Good luck with that.

Re: Angular 2: Built on TypeScript

#42

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.

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/why-is-javascript...

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

> When ran in optimize mode, it generated the following javascript - helloworld.dart.js which is of size 20k

Re: Angular 2: Built on TypeScript

#43

Is javascript really so bad? Edit: Why did this question get down voted? It was an honest question...

Not unless you try to make it look like Java.

It can be a challenge for sizable codebases, especially ones with many contributors and that undergoes steady refactoring.

That feeling you get when you see code with lots of type checking... A lot of engineering effort could be recovered with static typing.

Re: Angular 2: Built on TypeScript

#44
My main feeling about this is not so much about typeScript (which, meh, some syntax sugar I don't care about, and tooltips for an IDE I don't use) -- more it's that just the mere whiff of Microsoft's involvement will be enough to snuff out remaining developer interest in Angular 2.

Re: Angular 2: Built on TypeScript

#45

As if we didn't have enough reason to move on from Angular. Now you need to learn Typescript to contribute or grok the source files?

For some reason, I doubt that people here would be complaining about learning a language that resembles the next version of Javascript if it didn't come from Microsoft.

Re: Angular 2: Built on TypeScript

#47
Yay! I have tested TypeScript in hobby projects with a very positive experience. I have actually used typescript together with angular once. I was very disappointed when angular announced that they were going to make some kind of fork, for the runtime annotations they needed, instead of working together.

Re: Angular 2: Built on TypeScript

#48

Why not Dart?

Because Dart isn't a viable option for writing libraries or frameworks which are meant to be used from JavaScript.

You can interact with JS libraries, but exposing some API to JS-land is a completely different matter.

There are some vague plans to improve this, but there hasn't been much interest, because if you use Dart anyways, you do of course want to use it as the "host" language. It has the tooling and all that jazz. Of course you'd want to use it for as much as you can.

Post reply on HN