DEV Community

Discussion on: if javascript only needs the browser to compile why can't other languages do it

 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

You don't need a separate runtime environment though. Depending on what system you're compiling for, your compiler could easily just turn argc and argv into two globals, one being 0 and the other an empty array, or add some boilerplate code that reads them from somewhere else, like some external sensor. One could get creative with that.

Thread Thread
 
saptakbhoumik profile image
SaptakBhoumik

That's not how it morks most of the time

Thread Thread
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

But that's not what we're talking about; it doesn't need a runtime, regardless of whether it usually has one.