Why HTML/JavaScript/CSS are not compiled languages and will they ever be?

后端 未结 9 1314
死守一世寂寞
死守一世寂寞 2021-01-31 02:36

Why HTML/JavaScript/CSS are not becoming compiled languages (or maybe even merge into a single compiled language)? What if browsers were running \"Browser Virtual Machine\" and

9条回答
  •  悲哀的现实
    2021-01-31 03:13

    Speed.

    You're assuming that it takes significant time to parse HTML. However it might be that that time is insignificant compared to the time required for something else, e.g. the time required to layout the text on the end-user's window.

    No more "loose" and "half-correct" html. It is either correct or won't compile.

    You already get that, using [X]HTML.

    Looks the same in every (supported) browser.

    You seem to be saying that there should only be one browser, or that all browsers would support it equally.

    Internet standards don't happen by having a single body (the w3c) implementing something and declaring it a standard. Instead, internet standards happen by having multiple independent bodies creating multiple implementations. A consequence is:

    • Some people have developed something that isn't standard yet (i.e. they're ahead of the standard)
    • Some people haven't yet developed something that is standard (i.e. they're behind of the standard)

提交回复
热议问题