Live data from Hacker News

Angular 2: Built on TypeScript

blogs.msdn.com

61–70 of 235 posts

Re: Angular 2: Built on TypeScript

#61
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?

Pretty performant, see notes: http://t.co/gyBhc5jWzI (or streaming video right now)

Re: Angular 2: Built on TypeScript

#63

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.

Not that I'm an M$ fanboy -- but you must admit there are tons of C# coders that might not mind...

Re: Angular 2: Built on TypeScript

#64
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

I definitely concur. Having just attended emberconf, there's a stark contrast in how each framework is choosing to evolve with the web. Personally, I favor ember's approach of smaller, more iterative releases that are largely backwards compatible with previous versions. It not only means that teams building ember apps now can continue their efforts with confidence, but it's also a testament to the amount of thought and care the core team has placed in developing ember's abstractions; no major rewrite needed (so far). And ember's version 2.0 due out next quarter will be no different; same release cycle, same emphasis on compatibility with the added benefit of removing cruft that has built up in the codebase.

Perhaps I'm speaking from the perspective of our products at Yahoo, but ember has suited us well for precisely these tenets.

--Sam

Re: Angular 2: Built on TypeScript

#65
post #52

Earlier quoted context omitted.

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

I imagine they've improved the runtime size since that stack overflow post was posted a few years ago. However I've never used dart and just tried it out using a basic html sample from the tutorial page and I see:

    264 Mar  5 12:21 a.dart
    237K Mar  5 12:21 a.js
    101K Mar  5 12:22 a.min.js

It was also slow to compile, 6 secs.

Anything I'm missing?

https://gist.github.com/ratbeard/70902d6347ad448de0a4

Re: Angular 2: Built on TypeScript

#66

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?

This is the main reason why I don't like using languages that transpile into JavaScript. I don't mind the languages themselves but transpiling into JavaScript now means you have to be effective in both languages instead of one to properly debug and you're also subjected to bugs that may or may not be known in the transpile itself.

Everyone seems to hate on JavaScript but it's really not that bad to use.

Re: Angular 2: Built on TypeScript

#67
post #57

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.

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 wit…

> Dart can be run in both modes.

In production, it's only ever transpiled to JavaScript.

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

Not the real Chrome. A version of Chromium that you can use to make the development cycle smoother. When you deploy, you still transpile to JavaScript for all browsers.

Re: Angular 2: Built on TypeScript

#68
post #57

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.

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 wit…

> Haven't looked at TypeScript's interop with JS.

All JavaScript is valid TypeScript. This was one of the founding tenants for TypeScript. So interop is "just use the JS".

You can optionally also provide a binding file that tells TypeScript about the JS code so that it can perform compile-time checking on calls. There is a repository of these bindings for common libraries called DefinitivelyTyped [0].

> ... They only had a huge language spec PDF and not a single tutorial or something easier to digest.

Not sure when you originally looked, but there is now a tutorial [1], handbook [2], and samples [3] in addition to the language spec [4].

[0] https://github.com/borisyankov/DefinitelyTyped

[1] http://www.typescriptlang.org/Tutorial

[2] http://www.typescriptlang.org/Handbook

[3] http://www.typescriptlang.org/Samples

[4] http://www.typescriptlang.org/Content/TypeScript%20Language%...

Re: Angular 2: Built on TypeScript

#69

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?

This is the main reason why I don't like using languages that transpile into JavaScript. I don't mind the languages themselves but transpiling into JavaScript now means you have to be effective in both languages instead of one to properly debug and you're also subjected to bugs that may or may not be known in the transpile itself. Everyone seems to hate on JavaScript but it's really not that bad to use.

Transpiling may actually be the safest way to use JavaScript, especially given its rate of change. Take, for instance, a number of features trickling down the ECMA2015 pipe: modules, classes, "let", etc. Using these features without a transpiler, such as Babel, is simply not possible. A transpiler allows you to use these features now without any worry.

Not all transpilers may be to your taste, but they have their place.

Post reply on HN