News for hackers. Stuff that matters.
Re:State of JavaScript 2019 by azangru on Thursday December 19, 2019 @03:16AM (#21832994)
> I could go on and on about the horror that is typescript

In his talk Predicting the future of the web at the last ReactiveConf, Richard Feldman (not himself a typescript guy, but an Elm user) quoted an interesting statistic that most of developers who try typescript never go back to writing plain javascript. I do not remember where that statistic was from, but can attest that with me it is the case. So much for the horror that is typescript.

Re:State of JavaScript 2019 by josteink on Thursday December 19, 2019 @03:43AM (#21833119)
> In his talk Predicting the future of the web at the last ReactiveConf, Richard Feldman (not himself a typescript guy, but an Elm user) quoted an interesting statistic that most of developers who try typescript never go back to writing plain javascript. I do not remember where that statistic was from, but can attest that with me it is the case.

Same applies to me, but on the flip side: Typescript (by its very name) is probably only going attract the kind of users who appreciate the kind of things that Typescript provides.

People who insist that dynamic typing is best, that compile-time checks of code is wasted effort etc etc are probably never going to try Typescript (and then go back to JS later on, and thus ruining the "never going back"-statistic).

Re:State of JavaScript 2019 by Aeolun on Thursday December 19, 2019 @07:35AM (#21834317)
I feel like Typescript has been very successful (combined with the slightly earlier switch to Node) in converting those that were holding out against typing.
Re:State of JavaScript 2019 by Scarblac on Thursday December 19, 2019 @07:19AM (#21834235)
I also can't remember any technology that I've seen so few people complain about online. That was actually part of the reasons for us to start using it.
Re:State of JavaScript 2019 by Aeolun on Thursday December 19, 2019 @07:31AM (#21834296)
The worst thing about typescript (and all of the JS ecosystem right now) is the compile times.
Re:State of JavaScript 2019 by deckard1 on Thursday December 19, 2019 @04:34AM (#21833355)
> most of developers who try typescript never go back to writing plain javascript

yes, most developers adhere to RDD. That is, resume driven development. You ever see developers going back to Ruby from Node? Or from any shiny new thing to the slightly older but perfectly fine thing? I predict people will move on from TypeScript within 5 years. Purely because everyone will know TS so the differentiating value of TS will plummet.

Re:State of JavaScript 2019 by tybit on Thursday December 19, 2019 @06:37AM (#21833990)
This is really condescending. I don’t like writing JavaScript, I find writing TypeScript ok.

I avoid both when possible but if the business needs some front end or someone else has chosen Node I’ll oblige, and I’ll be happier if it’s TypeScript.

Either way it’s not contributing to my resume in a meaningful way as a backend developer.

Re:State of JavaScript 2019 by Aeolun on Thursday December 19, 2019 @07:33AM (#21834309)
Backend NodeJS is Typescript? At least if you know what you are doing.
Re:State of JavaScript 2019 by lllr_finger on Thursday December 19, 2019 @08:43AM (#21834793)
"Most" is a fairly strong quantifier, and some people would probably disagree.

Anything new could be termed as an example of RDD, but if that were always the case, we never would have had JavaScript in the first place. One (IMO) useful skill is determining when something new actually provides ROI or is actually a manifestation of RDD or similar.

Unless a language has really great first-class pattern matching (JavaScript does not), I don't ever want to work on a serious project in a dynamically-typed language. The guarantees provided with static-typing and the benefits when it comes to bugs, testing, and refactoring are huge.

Sure, devs that partake in RDD might move on, but there is a good use case for TS that has nothing to do with resumes, and everything to do with a preference in how to build software.

Re:State of JavaScript 2019 by rhacker on Thursday December 19, 2019 @01:33PM (#21837739)
Even if that is true, there is typically a reason things become popular. Right now only Flow / Elm / Purescript could possibly compete in that specific space. Do you specifically see people migrating en-mass to those technologies or do you think something better is coming... soon?

(Or are you literally saying people will go back to JS? - I don't know too many people excited about the prospect of losing all the contextual help and caught compiler errors - and I don't see that happening because of RDD anyway!)

Re:State of JavaScript 2019 by shantly on Thursday December 19, 2019 @01:38PM (#21837792)
I'm not above going along with tech I think's misguided or bad rather than fighting it, because I know it's trending up and will look good on my résumé, but ask for me to solo-write a Javascript project and tell me delivery must be in Javascript, explicitly not in Typescript, and I'm writing that fucker in Typescript and delivering you the Javascript that tsc outputs, and I don't care if no-one ever knows I did that. It's for my own sanity.
Re:State of JavaScript 2019 by allover on Thursday December 19, 2019 @05:31AM (#21833627)
TypeScript is kind of in its heyday though, it's fairly unlikely many teams would be comfortable making a bold decision to "switch back to JS", even if they want to.

Would need to be given more time for such a statistic to be meaningful, if it ever would be.

Re:State of JavaScript 2019 by TomMarius on Thursday December 19, 2019 @05:49AM (#21833732)
Not a single developer I know (I was in leadership position in a company with 300+ devs, now I lead a small startup dev team) cares about "heyday". They care about their experience during development being significantly worse with plain JS due to stupid ("we'll use TS because it checks names of properties") but also not so stupid ("we'll use TS because it checks that switches are exhaustive", "we'll use TS because it allows you to check nominal types") mistakes and bugs that TS helps to prevent. For all the devs I know, hearing that they have to code plain JS is the point when they head for exit.
Re:State of JavaScript 2019 by allover on Thursday December 19, 2019 @03:20PM (#21838816)
I never said people would "choose" TS because it's in its heyday, I said it'd be an unlikely time for most to wish to justify a switch back.
Re:State of JavaScript 2019 by leshow on Thursday December 19, 2019 @10:16AM (#21835539)
Most of the types you write in TS will be structural
Re:State of JavaScript 2019 by TomMarius on Thursday December 19, 2019 @11:06AM (#21836103)
Indeed, but the few ones that are nominal are making the difference.