Live data from Hacker News

JavaScript: The Modern Parts

amontalenti.com

21–30 of 122 posts

Re: JavaScript: The Modern Parts

#21
post #2

What's the view that TypeScript is the modern Javascript?

TypeScript adoption has been swift and decisive. In 2019, the majority of js developers that take surveys use TypeScript. 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 f…

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

#22
post #8

Earlier quoted context omitted.

Parent is talking about all the vulnerabilities and slowness that can come with it. Fair enough, it runs, but it can also open the door to fingerprinting and other weird nasties. Particularly anything reliant on the `npm install` way of managing dependencies is a potential risk from both server and client point of view.

Where is parent talking about any of that? What about today's javascript lends itself to fingerprinting any more than javascript from twenty years ago?

Agreed - I don't see how adding things like "let" instead of "var" or the spread operator (e.g "[...x]" instead of "[].concat(x)") makes fingerprinting or anything nefarious any more likely, apart from making it more pleasant to program so maybe more people will use it?

The "old" javascript was turing complete (as the article points out), as is the current one. It is not like they've added "Object.turnOnNefariousPrivacyInvasions()".

Granted, the browser APIs have evolved (e.g. webcam access, localstorage etc) and are exposed via Javascript, but that is nothing to do with JS the language.

Re: JavaScript: The Modern Parts

#23

>Understanding webpack, and why it’s important Not sure how Webpack is being attributed as being a part of Javascript here. It's a bundler, with Javascript support being one small piece in a much larger puzzle. It's not even the only bundler out there, JSPM is currently in beta which goes in a different direction than Webpack, then you have Parcel and other options as well. >Understanding babel, and why it’s importan…

I agree with your assessment, but the “major” web framework ecosystem (React, Angular, Vue) all use webpack as a de facto part of their toolchain. And webpack, in turn, relies on babel. Other bundlers are commonly used as part of plugin system. Regardless of transpiler tooling, the tooling is how most people are confident in using the most modern variants of JavaScript code. So it’s an important part of the modern js…

I agree, JavaScript the Good Parts was written in a time when there essentially was no ecosystem in Javascript to speak of, so it was by definition focused on nothing but the language.

In 2019 JavaScript comes as part of a much more developed (and useful!) ecosystem that is completely tied in with tools such as Babel and Webpack and the alternatives mentioned.

Even if you don't use or want to use any particular one of them, knowledge of all of them, at least what they do, is more or less essential to work in modern JavaScript to understand how the ecosystem fits together and how most projects out there use the language.

Re: JavaScript: The Modern Parts

#24
post #2

What's the view that TypeScript is the modern Javascript?

Given how fashion-driven the web industry seems to be, my guess is that some new hotness will steal the stage from it in the next few years. I seem to recall seeing tons of posts about CoffeeScript maybe around 6~7 years ago, but it doesn't seem to be very popular any more...

Maybe TypeScript will turn out to have more staying power, but my current guess is that something will happen that makes another technology -- probably WebAssembly -- very popular in the next few years and that will kill off a lot of the hype around TypeScript. Then that will itself mostly get killed off by some other technology about 3~5 years after it hits peak popularity, and so on...

I could be completely wrong though, of course! Predicting the future is hard. This is just my guess based on handwavey recollection of the last decade and a half of web trends.

Re: JavaScript: The Modern Parts

#25
post #2

What's the view that TypeScript is the modern Javascript?

TypeScript adoption has been swift and decisive. In 2019, the majority of js developers that take surveys use TypeScript. 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 f…

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

#27
I think today the Javascript ecosystem looks much better than 3 years ago, at the peak of Javascript fatigue.

What we had actually was tooling fatigue, and not language features fatigue. Today, with CLI tools like the Angular CLI, we have a ready to use optimized bundle via one out of the box CLI command, so no longer do we have to learn how to configure Gulp or Webpack.

I'm very glad that I decided not to learn Webpack and stick to the CLI, now Webpack is going to be replaced by Bazel transparently, and from a user perspective, nothing changes other than getting an even faster build and a smaller bundle transparently, without having to be a build tools expert.

I can now focus on developing the application and not the tooling, which is awesome for me. There are only so many hours in the day and I like to focus my learning budget on what moves the needle most.

Re: JavaScript: The Modern Parts

#28

Earlier quoted context omitted.

TypeScript adoption has been swift and decisive. In 2019, the majority of js developers that take surveys use TypeScript. 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 f…

> 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.

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)

Re: JavaScript: The Modern Parts

#29

Earlier quoted context omitted.

TypeScript adoption has been swift and decisive. In 2019, the majority of js developers that take surveys use TypeScript. 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 f…

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.

I agree. Correction added.

Re: JavaScript: The Modern Parts

#30

Earlier quoted context omitted.

Where is parent talking about any of that? What about today's javascript lends itself to fingerprinting any more than javascript from twenty years ago?

Agreed - I don't see how adding things like "let" instead of "var" or the spread operator (e.g "[...x]" instead of "[].concat(x)") makes fingerprinting or anything nefarious any more likely, apart from making it more pleasant to program so maybe more people will use it? The "old" javascript was turing complete (as the article points out), as is the current one. It is not like they've added "Object.turnOnNefariousPriv…

Those APIs also have a much stronger security model behind them today. Browsers require things like TLS and user confirmation before sharing geo information. Other actions like the clipboard API require user interaction (eg. button clicks).

JS of the past was the wild west. You want to add a bookmark? Go for it! You want to trigger a print dialogue? Why not!

Post reply on HN