> allow strangers to run random code on your computer
> deliver just data and my browser decides what to do with it
Code is data and your browser decides to execute it. A toy example, but HTML+CSS is Turing complete. The problem thus isn't that it's "code", but rather that it's not properly sandboxed.
> my shop browser decides how to operate with the catalogue in a way I want
Are you making a case for built-in components for e.g. sorting and filtering and what have you? To me that's just way more clunky than having an actual programming language. Even PDF, a static document format with no real user interaction, has a programming language (PostScript) embedded.
So in my view, the problem with JS isn't the features of the language itself, rather that the standard library has too much power, to make requests and access your microphone and stuff like that.
But even then, people want to use their computer to do video calls, and whatnot. And I for one much prefer using Zoom or Teams or such in the web app, instead of downloading the app version. Precisely because the web app is more tightly sandboxed.
But why should all content come with a turing complete language inside? That's a security risk waiting to happen (plus battery drain on your side).
PDFs are (usually) static pages in a fixed paper format, so they should only display stuff, not do calculations. Same for most web content anyone ever wants to visit (excluding games, demos, actual apps, etc).
>Are you making a case for built-in components for e.g. sorting and filtering and what have you? To me that's just way more clunky than having an actual programming language.
I'd take more clunky over what we have any day of the week.
>A toy example, but HTML+CSS is Turing complete.
And it shouldn't be. Problem fixed.
>Even PDF, a static document format with no real user interaction, has a programming language (PostScript) embedded.
Given the millions of PDF exploits, that's likely the worst example one could give in support of this.
> deliver just data and my browser decides what to do with it
Code is data and your browser decides to execute it. A toy example, but HTML+CSS is Turing complete. The problem thus isn't that it's "code", but rather that it's not properly sandboxed.
> my shop browser decides how to operate with the catalogue in a way I want
Are you making a case for built-in components for e.g. sorting and filtering and what have you? To me that's just way more clunky than having an actual programming language. Even PDF, a static document format with no real user interaction, has a programming language (PostScript) embedded.
So in my view, the problem with JS isn't the features of the language itself, rather that the standard library has too much power, to make requests and access your microphone and stuff like that.
But even then, people want to use their computer to do video calls, and whatnot. And I for one much prefer using Zoom or Teams or such in the web app, instead of downloading the app version. Precisely because the web app is more tightly sandboxed.
Replies (2)
PDFs are (usually) static pages in a fixed paper format, so they should only display stuff, not do calculations. Same for most web content anyone ever wants to visit (excluding games, demos, actual apps, etc).
I'd take more clunky over what we have any day of the week.
>A toy example, but HTML+CSS is Turing complete.
And it shouldn't be. Problem fixed.
>Even PDF, a static document format with no real user interaction, has a programming language (PostScript) embedded.
Given the millions of PDF exploits, that's likely the worst example one could give in support of this.