> majority of js developers that take surveys
i like that qualification :)
most likely typescript is still a very small minority given how large the javascript world is
Re:JavaScript: The Modern Parts
by growtofill on Saturday August 24, 2019 @03:59AM
(#20785916)
Source on your claim? It was about 50% on last year’s State of JS: https://2018.stateofjs.com/javascript-flavors/overview/
Have you read this article?
https://medium.com/javascript-scene/the-typescript-tax-132ff...
I use TypeScript. It's not all rosy.
Re:JavaScript: The Modern Parts
by tengbretson on Saturday August 24, 2019 @06:26AM
(#20786353)
There author of that article is speaking out of both sides of their mouth. How can they claim type safety has minimal value and simultaneously knock it for missing higher kinded types?
Re:JavaScript: The Modern Parts
by RobertKerans on Saturday August 24, 2019 @04:57AM
(#20786073)
I think a correction is needed here, it's "the majority of typescript developers that take surveys said they used typescript".
I'm being flippant, but Typescript is quite popular, that's it, most people who write JS write JS.
Re:JavaScript: The Modern Parts
by IggleSniggle on Saturday August 24, 2019 @05:06AM
(#20786103)
I agree. Correction added.
> In 2019, the majority of js developers that take surveys use TypeScript.
TS is quite popular, but this cannot possibly be representative of the general population of js devs, not even close.
it's more like ES6 >> JSX >> TS >> Flow.
Re:JavaScript: The Modern Parts
by IggleSniggle on Saturday August 24, 2019 @05:03AM
(#20786092)
46% was the survey number, so I definitely misremembered the facts. But your comparison here is inevitably necessary, since TS compiles to ES6/JSX, (as does Flow)
what was the survey sample size and how was the sample selected? (46% of 0.001% is still 0%).
my assessment isn't what things compile to but what they are authored in.
Re:JavaScript: The Modern Parts
by IggleSniggle on Saturday August 24, 2019 @02:13PM
(#20788711)
Good question. The state of js survey was self-selected, with 20.2k responses. The data is available if you’re interested. The npm survey, on the other hand, was sent to 800k registered npm users and received 33.4k responses, and also found 46% TypeScript usage. I imagine there is significant selection bias in a number of ways. And, while the state of js survey found 46% “have used ts and want to use it again”, the npm survey did not ask about preference. Still, a decent number of responses that I think is pretty interesting, regardless of your own preferences!
I don't understand why jsx is in your comparison, although I agree with your assessment.
To be clear there are a gazillion Js projects that don't use react.
it's a bit anecdotal but React /JSX is still more common than TypeScript (if for no other reason than time on this earth). and both are dwarfed by ES5/6
Re:JavaScript: The Modern Parts
by IggleSniggle on Saturday August 24, 2019 @02:15PM
(#20788725)
We are writing our React components in TypeScript, so I’m not sure what React/JSX have to do with TypeScript adoption?
Edit: Mea culpa. I got my numbers mixed up, or whatever source I thought I remembered just doesn’t exist. 46% in 2018 (state of js) says nothing about 2019, and is not a majority. That 46% is also backed up by a similar survey that npm ran. It’s worth adding though, I think, that js devs benefit from ts type inferencing and IDE support even if they aren’t using it directly