Da Streda 22 Februr 2006 22:06 Jeff Pritchard napsal: > Gregory Seidman wrote: > > Also, I want to mention that JavaScript is a rather nice language. Its > > primary failings are: > > > > 1) Minor implementation inconsistencies between browsers > > 2) Major API inconsistencies between browsers > > (snip) > Just plugging Ruby into browsers wouldn't really solve the API problems. A bonus of Javascript in this is that it has standards to support it, both language ones, and the W3C document API ones. If there are inconsistencies, at least there's authoritative points of reference to support these. Also, you can't possibly plain plug in the existing Ruby into browsers across the board. Unfortunately there is no standard governing client-side scripting in general, so if nothing else, making the required plugins would take a while. Also, the interpreter would have to go through some trimming to ensure sandboxing. Bits of the standard library would have to go away due to them being unnecessary or unsuited for browser scripting (Tk, readline?). Then, not all browsers were created equal, so there'd be further trimming of both the language and libraries to cater for mobile devices and the like. And sooner or later, Microsoft would decide to "improve" things and bundle IE with "Ruby Blunt: Whizbang Edition", and the list of things goes on and on. The bottom line is, you'd very probably end up with something that is at best similar to Ruby on webbrowsers, and the story of Javascript would at least partially repeat itself. Switching languages is not the solution for problems with browser scripting, and I'd dare say it's not even -a- solution for those problems. And right now, Javascript works, for given values of works (blessed be all you who don't deploy to proprietary set-top-box browsers). That said, it's not an unworthy goal, but there's quite a lot to do before it's actually good for anything serious, like letting Ruby loose on the unsuspecting web, with early-adoption problems aplenty on the road. David Vallner