News for hackers. Stuff that matters.
Re:TypeScript Won by knowtheory on Wednesday April 27, 2016 @10:59AM (#11580967)
I could quibble with the conflation of correlation w/ causation for a lot of the comments this post makes about es6/babel or coffeescript.

But each time i re-read this post, the cohesive point that pops out most is that this post is basically a Donald Trump speech about Typescript.

The claim is that it's bigger, it's better, and everyone else is a bit sad. It disingenuously claims that it's not about about competition and then literally ends with "Typescript Won".

So, lemme offer some rhetorical advice:

1) pick to a POV & stick to it. It's a competition or it's not. You either think it's worth highlighting how much better Typescript is over other technologies, or you don't.

2) Most of the points made in the post aren't assertions about the benefits of Typescript or the decisions it makes. Not everyone agrees that the existence of a static type checker is an unqualified benefit (and there are many dimensions to that conversation). If you want to make the assertion that Typescript makes your life easier/better because it has a type checker, assert the benefits of having a type checker (and the decision making for AngularJS's adoption of Typescript on the basis of having a type checker could use a citation).

3) Related to 1., this post comes off as MEGA passive-aggressive because you keep on mentioning how much you also love other technologies at the same time talking about how they are inferior to Typescript on a variety of shifting bases. Because of that you're not telling a cohesive story about Typescript. You're just talking about how you think other technologies are bad.

Re:TypeScript Won by mordocai on Wednesday April 27, 2016 @11:31AM (#11581278)
On point 2, I don't think an optional type checker has any real downsides that I can think of (optional because with typescript you don't have to add type annotations to your code). It helps with debugging and possibly performance but you can choose not to use it.

The rest of your comment I agree with.

Re:TypeScript Won by doodpants on Wednesday April 27, 2016 @11:47AM (#11581484)
I have no experience with TypeScript, but in general the downside of optional language features is when you're working with a team, and different people end up using different dialects of the language.
Re:TypeScript Won by chimeracoder on Wednesday April 27, 2016 @12:20PM (#11581820)
That doesn't really apply here, because type annotations have no runtime effect. They're effectively comments.
Re:TypeScript Won by jaredklewis on Thursday April 28, 2016 @01:39AM (#11586733)
The content of comments isn't enforced by the compiler, so I would say they are not very comment-like.
Re:TypeScript Won by SonicSoul on Wednesday April 27, 2016 @02:42PM (#11583316)
you could say that about any high level language. i.e. that it's effectively metadata few levels above metal ignored at runtime. But it is relevant here because the relevant part is working with application code within a team half of which may choose to use optional features
Re:TypeScript Won by Touche on Wednesday April 27, 2016 @12:55PM (#11582200)
It's just weird to compare philosophically different languages. ClojureScript fans are never going to switch to TypeScript. So saying TypeScript has won the transpiler wars is hilariously wrong.

Comparing TypeScript to transpilers in the same space, like Flow and Dart makes sense. They're trying to accomplish similar goals at least.

Re:TypeScript Won by ratbeard on Wednesday April 27, 2016 @02:01PM (#11582877)
A downside is everyone on your team has to learn how to use it.
Re:TypeScript Won by ssmoot on Wednesday April 27, 2016 @12:34PM (#11581992)
I can't think of any downsides of an optional type checker. Can you? Just curious if there's an argument I hadn't heard before.
Re:TypeScript Won by bcoates on Wednesday April 27, 2016 @12:59PM (#11582233)
Same problems with linters: people write weird code and/or introduce unnecessary changes to correct code that doesn't pass the check.

Also, optional type checkers throw away a lot of the upsides of type systems (safe refactoring, type-aware optimizations, useful generics) so they're kind of a worst-of-both-worlds solution.

Re:TypeScript Won by mercurial on Wednesday April 27, 2016 @01:09PM (#11582322)
> Same problems with linters: people write weird code and/or introduce unnecessary changes to correct code that doesn't pass the check.

Having just converted a bunch of pure Javascript to Typescript, and writing new code in Typescript, this hasn't been an issue.

> Also, optional type checkers throw away a lot of the upsides of type systems (safe refactoring, type-aware optimizations, useful generics) so they're kind of a worst-of-both-worlds solution.

I'm not sure what you mean by "throwing away safe refactoring" but yeah, you don't get the performance benefits or reified generics (not that it's particularly useful). That said, it's not like you derive any performance benefit from Java generics either.

Re:TypeScript Won by softawre on Wednesday April 27, 2016 @12:43PM (#11582095)
If it's TypeScript versus pure JavaScript (not versus Babel), there's a transpile time hit you must consider.
Re:TypeScript Won by WorldMaker on Wednesday April 27, 2016 @12:55PM (#11582198)
Pure (vanilla) JavaScript will remain a bit of a rare unicorn in large projects, though, at least until HTTP/2 and maybe even after HTTP/2 for whatever other reasons [1]. Just about every large project has a bundler and/or minifier step and the Typescript transpilation fits right in there, instead of in the browser.

[1] People will always still want to shave bandwidth, and the new hotness is Tree Shakers which shave bandwidth and computation/JIT time for the browser...

Re:TypeScript Won by Touche on Wednesday April 27, 2016 @12:57PM (#11582216)
Just about every large project has a bundler step for production. Many have for dev as well, but this is unequivocally an undesirable thing. You can't beat Refresh for dev workflows.
Re:TypeScript Won by WorldMaker on Wednesday April 27, 2016 @01:27PM (#11582504)
In dev workflows you can deal with the extra few milliseconds of transpilation time just like you deal with the extra few milliseconds of overhead from any of your other dev tools.

Plus, even a bunch of dev workflows are increasingly using tools like gulp-watch in the background of their refresh cycle (for whatever reasons), and Typescript's watch support has gotten very good.

Re:TypeScript Won by Touche on Wednesday April 27, 2016 @01:37PM (#11582603)
You can "deal with" a lot of things, but that doesn't make them desirable. It's not like the community has evolved towards build scripts because build scripts are great, it evolved in that direction because the ecosystem has changed faster than the web has been able to keep up. Once the web catches up on the module front you'll definitely see the refresh workflow regain some lost popularity.
Re:TypeScript Won by WorldMaker on Wednesday April 27, 2016 @02:48PM (#11583385)
Maybe? There's always an "ES Next" in the evergreen world. There's always some feature you might want to use today that a build tool makes accessible that otherwise you'd wait months/years for browser support to "catch up". The goal posts will keep moving, especially now that TC39 is working on an "agile" yearly spec release cycle.

After modules there's async/await and after that there's plenty more future to discover...

Re:TypeScript Won by Keats on Thursday April 28, 2016 @08:13AM (#11588195)
I'd say live reload beats refresh for dev workflows (when it works).
Re:TypeScript Won by verroq on Wednesday April 27, 2016 @12:24PM (#11581857)
I don't know what any of this has anything to do with Trump.
Re:TypeScript Won by knowtheory on Wednesday April 27, 2016 @12:28PM (#11581918)
Donald Trump, well aside from the content of his speeches, has been noted for his rhetorical style. As i stated, this bears some resemblance.
Re:TypeScript Won by atom-morgan on Wednesday April 27, 2016 @12:30PM (#11581936)
> this post is basically a Donald Trump speech about Typescript.
Re:TypeScript Won by nathancahill on Wednesday April 27, 2016 @12:49PM (#11582145)
Low energy.
Re:TypeScript Won by emodendroket on Wednesday April 27, 2016 @12:36PM (#11582017)
But that's kind of what the article is about, isn't it? TypeScript is a way of having types and yet existing in a typeless world.