JavaScript is the "VM" to target for D
Nick Sabalausky
a at a.a
Sat Apr 24 13:54:17 PDT 2010
"Adam D. Ruppe" <destructionator at gmail.com> wrote in message
news:mailman.71.1272140482.3522.digitalmars-d at puremagic.com...
> On Sat, Apr 24, 2010 at 01:53:10PM -0600, Rainer Deyke wrote:
>> Congratulations, you just invented ActiveX. I hope you like your
>> platform lockdown and your security vulnerabilities.
>
> ActiveX controls don't run as a limited user account. That's the key here:
> the entire browser should be running as a restricted user, and it creates
> processes even more restricted than itself.
>
> (When Google did this in Chrome, it was hailed as brilliant and
> innovative.
> I saw it as them finally doing what they should have been doing from the
> beginning.)
>
I remember reading an online comic explaining all of Chrome's wonderous
advances and thinking much the same thing.
>> 99% of web pages will offer just the win32 version.
>
> Meh, works for 91% of users.
Maybe I'm just naive about this, but it would seem to me that it should be
possible to have a single compiled-native-code format that could be "framed"
by the client to work on the whatever the client's OS is. I mean, x86 is x86
regardless of OS. Of course, that still leaves a need for a CPU architecture
request header, and 99% of sites would ignore anything but x86, but it'd be
an improvement over needing both CPU and OS.
Also, a web server could be set up to automatically convert or cross-compile
to whatever CPU or OS was requested by the client (and then internally
cached, of course). Probably involving LLVM or something. Having standard
plugins like that even for just for Apache and IIS would fix the issue for
99% of sites and 99% of users. And there could certainly still be fallbacks
for the oddball servers and clients.
Plus, there's still other VM-bytecode possiblities besides just JVM. There's
LLVM. Or you could transmit a standardized precompiled JS bytecode (even
though JS may be quick to parse, I've still thought it was a bit silly to
have the clients do the JS compilation since 99% of it is all the same code
being sent out to all the different clients). Etc.
-------------------------------
Not sent from an iPhone.
More information about the Digitalmars-d
mailing list