|
|
|
|
|
by andrepd
4048 days ago
|
|
Makes me wonder, as a non-web developer, would it be possible in principle to develop for the web in a low-level language like C/C++? What I mean is, is it only impractical and inconvenient for the developer, or is it fundamentally impossible? |
|
What would "develop for the web in a low-level language" even mean? An assembler interface to the DOM isn't going to help.
The problem is the computational complexity of the task. Every CSS rule has potentially to be re-applied to every DOM object every time you change anything. Especially the sizing and layout ones. Because they're all interdependent, paralellism won't save you here. By comparison, games are so fast because pixels can be parallelised.
You could build an alt-web if you had a suitably sealed VM running code in any language with access to the rendering portal and a security-enforcing network abstraction. This was what Java applets were supposed to be, and Flash is somewhat, but they had three problems:
- fixed size: ability to cope with resize or different devices not built in
- not as secure as hoped (javascript-to-local-user exploits have been very rare by comparison)
- too slow to start up and too willing to hog resources when they did.