Live data from Hacker News

Angular 2: Built on TypeScript

blogs.msdn.com

181–190 of 235 posts

Re: Angular 2: Built on TypeScript

#181

Earlier quoted context omitted.

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.

Oh, I have no problems with strong typing. In fact I think it's a good thing to add to angular. Angular, (And I say this as once upon a time contributor to Protractor) however, is kind of a step in the wrong direction, and I concluded this before they started flapping about with all these giant course corrections.

Re: Angular 2: Built on TypeScript

#182

Earlier quoted context omitted.

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.

[deleted]

Re: Angular 2: Built on TypeScript

#184
post #130

Earlier quoted context omitted.

I don't think that analogy is valid. It's more like if a C++ project started using a bunch of proprietary third-party language extensions, in which case, yes, I would complain because I have to learn some non-standard C++ derivative in order to be able to read the source code.

I disagree. Typescript is just ECMAScript 6, with type annotations. Most of the differences come from the language changes (ES5 -> ES6), than the superset that Typescript explicitly adds.

> Typescript is just ECMAScript 6, with type annotations.

Then it's not "just ECMAScript 6", is it? Anyway, I'm not saying TypeScript doesn't have merit--in fact, I'm considering using it in my next web app. I'm just saying that using TypeScript is a tradeoff that's not without drawbacks, since you're now dependent on a new set of tools and new additions to the syntax (which means, for instance, that your editor/IDE has to specifically support TypeScript). You could say the same about ES6, but at least the latter is at some point going to be standard among browsers (and the tools won't be needed).

Re: Angular 2: Built on TypeScript

#185
post #94

Earlier quoted context omitted.

I feel more comfortable writing TypeScript rather than using an ES6 transpiler, really. The compiler is built really well - you can observe the team's development process on github and I have to say the level is quite impressive (extensive code reviews and great discussions on the issue tracker).

I'm sure the compiler is well built but stability is my main concern. JavaScript, even with its many flaws, is used by millions of people every day and is one of the most used programming languages in existence. That's a ton of testing through real world use. Since transpilers just compile to JavaScript, they can take advantage of some of the same stability of JavaScript for its output but the act of transpiling is o…

You have a very valid point regarding bugs. Transpiler bugs definitely happen. When I first tried using Babel - still named 6to5 then - instead of Traceur, it immediately broke my code because of an incorrect TCO implementation in Babel. Babel's maintainer (sebmck) is insanely responsive and the bug was fixed almost immediately, but still.

If I used Babel or any other transpiler for critical production code, I would only enable a whitelist of features that I thoroughly understand: for example, how a fat arrow is translated into a regular function. This vetting would be time-consuming, but that's a price I'd be willing to pay because I enjoy writing ES6 much more than ES5. That's highly subjective though, so I completely understand how some other people would rather just stick to ES5 and get stuff done with the lowest possible risk of weird things happening.

Re: Angular 2: Built on TypeScript

#186
post #142

Earlier quoted context omitted.

> How in the world does this man keep up with all these projects? He needs to write a book on motivation. By dumping them mid-way and getting to the next shiny one? Anybody knows how this RoR kickstarter project finally went?

Interestingly, I was just talking to someone yesterday about how Yehuda is very good at handing off projects. When he doesn't personally finish something he started, it's because he's handed off the work to someone else who is taking it to completion. I've never seen him abandon any project.

Sounds... glamorous.

Re: Angular 2: Built on TypeScript

#188

Earlier quoted context omitted.

"deserve's got nothing to do with it". The source is open and licenced. If you make technical decisions based on this kind of emotion you will waste a lot of time going round in circles. Because once you start looking for the spooks they're everywhere. Technical forums ain't what they used to be. The problem for me is that this kind of Tarot card thinking is also now to be found in your local workplace. But there rea…

Look at the list of contributors to the project (both in terms of numbers of committers and commits). Overwhelmingly Microsoft employees. Until it gains some serious momentum where it could successfully be forked and seriously maintained by the open source community at large, at this point it's a Microsoft product, and you have no choice but to trust their support and openness, so you can't hand wave away the trust i…

Uhhh...lots of Microsoft employees working on Typescript is a good thing. Pulling the old, "We're happy to leave this in "the community's" hands would be a bad thing for obvious reasons.

Seriously, stop the FUD

Re: Angular 2: Built on TypeScript

#189

Earlier quoted context omitted.

Wrong, JavaScript is valid Typescript, so you don't have to rewrite anything.

This is a silly thing to say; why would you use TypeScript if you're going to leave everything exactly as it was in JavaScript? Wouldn't want to rewrite it using TypeScript features? Otherwise there would be zero point to TypeScript.

You seem to be unaware of what TypeScript is. TypeScript is more of a high-powered linter than a new language. If you take Javascript and put it in TypeScript mode, most errors are due to variable reuse (x was a number and now a string) or actually an error in the javascript if you're trying to be well typed.

For a certain style of Javascript, making it Typescript is a no-op

Re: Angular 2: Built on TypeScript

#190
post #130

Earlier quoted context omitted.

I disagree. Typescript is just ECMAScript 6, with type annotations. Most of the differences come from the language changes (ES5 -> ES6), than the superset that Typescript explicitly adds.

> Typescript is just ECMAScript 6, with type annotations . Then it's not "just ECMAScript 6", is it? Anyway, I'm not saying TypeScript doesn't have merit--in fact, I'm considering using it in my next web app. I'm just saying that using TypeScript is a tradeoff that's not without drawbacks, since you're now dependent on a new set of tools and new additions to the syntax (which means, for instance, that your editor/IDE…

I don't see what the trade-off is. You can just take the transpiling output and go home if you want. Out of all the languages that transpile to JavaScript, Typescript is probably the least risky because it is just JavaScript if you want it to be just JavaScript.
Post reply on HN