Essentially the same html/css rendering of Firefox or Chromium, still able to access the www, but with javascript fully removed for another language that can be interpreted - like python or lua. Is this feasible?
based on your other replies, it looks like you want to be able to turn off JavaScript but still have a scripting language be able to run. I’m a little confused why you’d want that or what benefits that would bring.
there were plans for multiple scripting languages for the web, hence the
type="javascript"attribute on the<script>tag. the thing that became javascript was originally more like a lisp, but netscape wanted to cash in on the popularity of java applets so they made the language look more java-y.the bones are there, there’s just no sense in implementing it in mainstream browsers now.
Microsoft had a Visual Basic variant (VBScript) in IE that got some attention back in the 90s; it’s probably just as well that JS won instead of that…
In modern webdev
type="module"is used to indicate an ES6 module andtype="importmap"to include a JSON table of paths to modules. Still basically JS, but the parameter is still used in a meaningful way.
Arguably typescript fits, it is converted to JS for runtime, but the developer writes TS. You theoretically could transpile python or lua to JS, no idea if it exists yet though.
Otherwise WASM would be the main contender, dunno if lua or python can compile to wasm, but lots of languages can.
Typescript doesn’t run on the browser. But I’m pretty sure we will see native typescript soon. At this point, TS is practically the industry standard for developing serious JavaScript.
I dunno, I don’t see the benefit to native TS in the browser. For compatibility, all sites will continue to serve JS, so what does TS gain anyone? And there is no performance benefit, maybe a performance hit given none of the type validation can happen until all of the scripts have downloaded, so execution can’t begin until that has happened?
I could be way off on this though, I’m not a webdev :/
Type assertion in runtime would be really useful
Can you even get runtime type assertions in TS? Isnt it all at compile time?
That’s my point… You’d need native TS support for that
I don’t think I understand. Native TS does the type checking at compile time right? Not run time? Or would the compile happen in the browser?
Browser-native TS would run directly on the browser without compiling.
The network effect makes this unlikely to take off. But in theory it’s possible, and I suppose somebody probably has created/will create one as a hobby project/prototype that a small number of people will use.
I’m aware and not really worried about that
Sure but then you are basically creating an alternate web which is incompatible with the current one. Your browser wouldn’t be able to load any js based sites and current browsers would not be able to load your python/lua based sites.
I see that as mostly positive 😆
WebAssembly? https://en.wikipedia.org/wiki/WebAssembly?wprov=sfti1
it isn’t specifically interpreted though
yes, but there’s no demand for it