suggestion - RJavaScript

forgive me if my post is off-track, i just discovered this w3o applet
initiative exists and haven't read much of it yet.

My proposal is for an extension to JavaScript, perhaps called RJavaScript.

RJavaScript would be a subset of the JavaScript language, which
doesn't support some of its more dynamic features (prototype-based
programming, dynamic typing, and hash table lookups for attributes
might be candidates).  My understanding is that JavaScript's
particular level of dynamicm makes it virtually impossible to execute
it at competitive speeds with other languages, like C#, Java or C++,
even with the new JIT-compiling JavaScript engines.  For any task that
needs to be executed particularly fast, that part of the program could
then written in an RJavaScript block (hopefully as an extension to
JavaScript syntax, not as a new SCRIPT tag type option, to make it
easier to intermix the two language types).

For those familiar with Python and RPython, RJavaScript might be to
JavaScript what RPython is to Python.

The reason I'm suggesting the idea to *this* group is that one
possible and particularly likely application of it could be in
something like applets.  It would be like, for example, having a
standardized Silverlight-like API, only instead of using .net for the
language you would use JavaScript and optionally its RJavaScript
sub-blocks.  This way a standardized replacement for Silverlight could
be defined that runs at competitive speed with Silverlight and doesn't
needlessly complicate things by introducing a second language
completely separate from JavaScript.

(I'm using Silverlight as the point of reference rather than Flash
because it has more features, provides better integration with the
rest of the web page, and particularly needs to be usurped by
standardization since it's Microsoft world domination Windows-only
crap.  Also I prefer something Silverlight/Flash-like to something
Java-like because Java sometimes requires annoying user permission
requests, seems to run in more isolated screen areas or even in
separate windows, has a ridiculous loading time, and doesn't seem to
have some of the features that are particularly useful for typical web
stuff (video streaming, stylish-looking games, and custom animated
user interfaces) like Flash does.)

Obviously simply defining a restricted subset of JavaScript won't
automatically make things written in it run faster - it would be up to
the market to create optimal engines for RJavaScript sub-blocks.

Received on Friday, 4 December 2009 10:59:18 UTC