Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
dotenvironment591204dI find the world of backend to be very cool in this space. there are many platforms to build and run the software : java, python, c++,js, php,... so much. and its because their underlying OS supports these. i wonder how cool it would be, if phones were also like those heroku or github action images : having a lot of languages installed on them by default and allowing devs to create a software in any of the programming language(with ui capabilities)
-
Voxera11395204dFor browsers there have been multiple attempts but with multiple companies no one was too keen on adopting a lang designed by another for the fear that the creator would get some advantage.
Web assembly grew sort of on the side until it was popular enough to win general acceptance. -
iiii8813204dAlso, an app does not actually have to go through java. Heard of Android NDK? Parts of the app can have pretty much a bare metal access.
-
lorentz12024204dNone of these apart from the browser actually form a closed abstraction, they're all just environments expected to behave in a particular way with abundant ways to exit the environment to leverage platform specific optimizations and features. And even in the browser, the actual application code could be WASM which is still an abstraction layer but a very thin one at that.
-
lorentz12024204dAn OS written in C is never a closed abstraction just because of the C part, because an inalienable part of an OS is to load binary data and execute it, which is UB. You can sandbox such an app using particular hardware features such as virtual memory, but then the sandbox is on the hardware level.
-
Voxera11395204d@iiii more like a common language runtime, the browser does not have isolation like a VM.
So more like the clr or java runtimes snd supporting either javascript or wasm.
Wasm especially is very much like il or java byte code (but I do think it has some compiled stage also) -
killermenpl1429204dIt's actually the other way around. It's not "JS is the only one with access to browser features", instead it's "browsers only allow JS to use those feature by refusing to implement support for any other language". There were attempts to use other languages - IE at one point supported VB. There were also "middle" layers, like Flash, Java applets or Silverlight. All of them died out either due to vendor lock (VB only worked on IE), or due to being too insecure and buggy to use
There were also attempts at bridging the gap by transpiling languages like Java directly to JS, but you can guess how that went based on how popular those solutions are.
Now there is Web Assembly (wasm), which promises to let anyone write in any language they want and compile down to a browser-understandable byte code, similar to how JVM works. It's been growing slowly, but steadily, and most modern browsers have at least some support for it. Hopefully it doesn't die out like all the previous attempts... -
tosensei3911204d
I often wonder why JS is the only language that has the native support from browsers and native built in DOM apis?
The world has come up to a saturation point for so many techs:
- if a software is needed to be created for mobile, it must go through 1 layer of java (aka JVM) or objective C (i guess? for ios) before being understood by the CPU
- if a software is needed to be run via browser( which itself is made to run on jvm, objective c or machine language), it must go through one layer of js interpretters before being understood by the CPU
all the OS are made on C but the application and application platforms are made on specific languages. I wonder why can't there be a single application platform, if all of them(browser, JVM,objective C and whatever .exe apps run on) are doing the same thing and are equally mature to handle every usecase?
question