Wade Curry wrote:
One thing that i've wondered on occasion...  Why is it that no one
has written a Firefox extension that can deal with a different
scripting language directly?  Instead of writing python that gets
translated into javascript, wouldn't it be better to write python
that runs as python in the browser without translation?

If it does not ship with the browser nobody but you and me are going to be able to use it so why bother?

Taking a purely superficial view, it seems that if your code were
going to be translated into javascript, then it would cripple
your ability to really use any of the more interesting classes in
the client code.  "Ooops! can't use that class because it doesn't
translate to javascript!"  If you were to use python directly,
though, I imagine the imported classes could be included from the
server, and/or overridden by the client (a la greasemonkey).

Javascript is turing complete so theoretically anything you can do in your language can be done in javascript, it's just a matter of how inefficient it might be. Realistically speaking javascript is generally only used for basic calculations and manipulating the DOM. There will probably have to be some things we give up in our original language.

How is java implemented in browers?  Could Java currently do the
things that javascript is being used for in AJAX?

Through a plugin provided by Sun. I don't know if Java can manipulate the DOM from the jvm or not. I have a feeling it cannot.

I've not heard of TAL or METAL until now.  At what point does
TAL/METAL call out to the functions?  It sounds kind of like a
macro setup, of sorts, to me.  Although I like macros a lot, in
this case it seems like smothering lousy food with lots of gravy.
It still seems that if the J in AJAX were replaceable in a modular
style, it might be better.

TAL is Template Attribute Language. It is a page templating language. Pretty cool stuff:

http://www.faqs.org/docs/ZopeBook/ZPT.html

If Java really wouldn't work for this, then at least it may provide
a model for how a different interpreter could operate with various
browsers.  Maybe it wouldn't be too difficult to make happen...

I think that perhaps instead of needing a standard ECMA scripting language (ECMAscript aka javascript) perhaps what we really need is an ECMA standard virtual machine to run our preferred languages on. Would be nice if the jvm could somehow be made to do that but the way Sun is holding the jvm proprietary worries me too much to seriously propose that.

--
Tracy R Reed
http://copilotconsulting.com
1-877-MY-COPILOT

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to