Live data from Hacker News

Angular 2 docs for ES6/7

github.com

41–50 of 62 posts

Re: Angular 2 docs for ES6/7

#41
post #38

It's the attitude of the Angular 2 team that makes me glad I decided to choose Aurelia instead. Nobody seems to realise that Angular 2 exists first and foremost to meet the needs of Google's internal Green Tea team and not the public. This is just one of many things that should make people think twice about using Angular 2. The fact the team seemingly take input from a select handful of "Google experts" to guide the…

What's Green Tea team and why is Angular tailored for them?

Green Tea is Google's internal CRM system and something to do with AdWords.

I guess why it's tailored to them is somewhat self explanatory -- they want a framework that handles the specific frontend needs their projects have.

Re: Angular 2 docs for ES6/7

#42
post #26

Earlier quoted context omitted.

I love how any discussion about any Google product or news inevitably segues into a whine about a discontinued product from 2013.

> segues into a whine about a discontinued product from 2013 I see this happening too often but I don't see how that happened in the parent comment though.

> NG2 is a monolithic and over-engineered framework backed by a company who have proven they conflict with themselves (Polymer) and deprecate popular services on a whim (Google Reader).

It's a tiny bit of a stretch to call it a whine, but it's old when it's brought up constantly, tbh.

Re: Angular 2 docs for ES6/7

#43
post #12

Typescript is a superset of ES6 anyway, proper JS documentation(e.g MDN) does have the notion of types anyway, but basing the documentation on TS means that the types are sound and consistent along the library.

Strictly speaking, TypeScript isn't a sound type system: https://www.typescriptlang.org/docs/handbook/type-compatibil...

Re: Angular 2 docs for ES6/7

#44
post #35

That's duck

I'm not sure what's going on, but the reply link on your comment appears in italics.

Is this a formatting bug or some new HN thing I'm not aware of?

EDIT: I guess formatting bug. The comment ends with a trailing in the DOM inspector.

Re: Angular 2 docs for ES6/7

#45
post #4

I say good. One of the next tasks I'm going to take, as soon as I get some free time, is to integrate TypeScript into our front-end and start adding in interfaces and parameter types. I'm usually working on the back-end, but get drafted into the UI-side once in a while. The number of stupid little errors caused by typos or not having decent intellisense is troubling. Compared to the level of tooling and safety I'm us…

Your gulp job sounds like the real issue. Use IntelliJ and that fixes a lot of the problems

Or Webpack.

Or stop running every dependency through Babel (which is the biggest source of build slowness I've seen in the wild).

Re: Angular 2 docs for ES6/7

#46

It's the attitude of the Angular 2 team that makes me glad I decided to choose Aurelia instead. Nobody seems to realise that Angular 2 exists first and foremost to meet the needs of Google's internal Green Tea team and not the public. This is just one of many things that should make people think twice about using Angular 2. The fact the team seemingly take input from a select handful of "Google experts" to guide the…

> I think you should allow developers to write using straight-up Javascript. They do, just not ES6. "The examples of the docs are planned to be written in TS, ES5 and Dart". I tend to agree with their argument that if you're using ES6, why not just use TS.

Because ES6 is a standard and TS is not.

Moreover ES6 is almost fully supported by current browsers (besides IE11) so you don't have to use transpiler (which adds a performance overhead).

Re: Angular 2 docs for ES6/7

#47
I am a strong believer in Angular (1 & 2) and in JavaScript. I am using Ng1 & Ng2 on production. I even have a seed project for Ng2 that uses pure ES6 (no legacy Babel plugins). See https://github.com/valera-rozuvan/angular2-es6-seed .

I know how much it hurts when you can't find decent documentation for Ng2 with ES6.

Re: Angular 2 docs for ES6/7

#48
post #33
post #15

Earlier quoted context omitted.

That's a common misconception about the JVM. Although the language features allow type-erasure, the JVM actually stores the types with the data and uses tracing for optimization. This keeps the compiler output smaller and allows classes to be compiled independently.

Still it doesn't have to check overloaded arithmetic operators each time and to look up class instance properties in hash table.

The operators are converted to methods, however methods are 'looked-up' at run-time. Not in a hash-table though, think C++ style vtables. So int + float isn't compiled to int.addFloat( float ) but to int.add( float ) and then uses polymorphism at run-time.

If you do try to eliminate all of this work at run-time, by creating type-specialized versions of every method, you have the problem that code that tries to narrow a type by either casting, or doing an instance-of check on a supertype (like Object) needs special treatment.

All these choices were made long before they implemented 'generics', so most code was doing manual narrowing and casting all over the place, including the standard API's. Type-erasure would not actually improve the performance by much since it could hardly be used.

They solved the performance problem, without actually considering the type system. Your code runs just as fast, as if you used the Object type everywhere, and just cast on the fly to what you expect it to be. Which would be equivalent to a dynamically typed language.

Re: Angular 2 docs for ES6/7

#49

It's the attitude of the Angular 2 team that makes me glad I decided to choose Aurelia instead. Nobody seems to realise that Angular 2 exists first and foremost to meet the needs of Google's internal Green Tea team and not the public. This is just one of many things that should make people think twice about using Angular 2. The fact the team seemingly take input from a select handful of "Google experts" to guide the…

> I think you should allow developers to write using straight-up Javascript. They do, just not ES6. "The examples of the docs are planned to be written in TS, ES5 and Dart". I tend to agree with their argument that if you're using ES6, why not just use TS.

That quote is talking about documentation, not about coding

Re: Angular 2 docs for ES6/7

#50
post #36
post #13

I've been learning AngularJS 2 for around 2 weeks now, and I see why they push use of Typescript. They always have. AngularJS 2 was designed from the start to be typed. To be object-orientated. At the least be object-inspired. It makes sense to be consistent. Using a non-typed and functional-structured language for a typed and object-orientated framework is pretty dumb in my eyes. To digress a little, AngularJS 2 has…

> Routing in AngularJS 2. > It is bad. I'm curious what you don't like about the Angular2 router. Since router 3.0 (agreed there were some false starts) I've found it to be a pleasure to work with.

I think that there's way too much bloat/boilerplate code for the simplest of auth-based routing system. Auth service, auth-guard service, routing service, etc..

Not sure if I'm just bad though, I suppose i'll keep on trying.

Post reply on HN