That's All?

I just googled for "ecmascript java rhino jscript.net actionscript flash "virtual machine"" and the only thing that it found was the JavaScript entry on wikipedia.

Maybe this is a fever dream from the flu I'm just now shaking off. I really am taken by the idea of a standard, established, independent language, EcmaScript v3+, which can work unmodified on the Java virtual machine (standard as of version 6), the Flash/Flex virtual machine (ActionScript), and the .NET CLR (JScript.Net).

(And it's JavaScript? Unbelievable. I'm not a fan of JavaScript, although that really has a lot more to do with my dislike of HTML. Yes, HTML has accomplished amazing things, but it's so inelegant. Besides, JavaScript in a browser is subject to the whims of the browser. I don't know about Rhino, but Flash and JScript are both good solid implementations of this.)

EcmaScript seems to be all things to all platforms. It's OO, if you like that. Or functional, if you prefer. It's dynamic. It's static. It's got closures. Reflection is probably VM-specific. It runs in every browser, on any Linux server, on any Windows or Mac front end. Heck, it'll run in either an Oracle or a Microsoft SQL database.

Business logic in EcmaScript, isolated from language-specific libraries, with portable unit tests, and serialized. Now, that is some DRY, mobile code. I can now move behavior across the wire, across different virtual machines, as easily as data.

...

It is also, I should note, the red-headed bastard stepchild of .NET, with no decent editor available. Managing references is already hard in JScript. Managing the same code that to be copied around into different projects and actually requiring a different compiler for each different components... that's a little different. But I've done a lot of fancy build scripting lately and I think these problems could be overcome.

...

So, I once posted on Bob Martin's message board that dynamic languages would really take off as soon as there were really good IDEs. I really like debuggers, IntelliSense, and refactoring. Ah, well. I may find out if he was write that good unit tests can replace debuggers.

...

So, next question: What does Ruby really have on EcmaScript? EcmaScript V3, I mean; the older ones that don't support classes just don't count. Probably a slightly cleaner syntax. But is it significantly limiting? If only there were a Rails.NET, I could really compare apples & apples.

Python, of course, I could compare more easily to IronPython.

Very intriguing.

Rhino

Sadly, Rhino doesn't seem up to snuff. I'm not sure it can build .class files using a built-in command-line tool in Java 6. Thus, the comment above about loading EcmaScript classes into Oracle may have proved too optimistic. (It's expected to be used as a scripting language by a larger Java application, so there are Java classes which can compile it, but I don't know if they put together a full-fledged compiler which outputs .class files.)

Still, my theories held together for some examples in ActionScript and JScript. And I can still have an open server using Mono.

Post new comment


*
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can use Textile markup to format text.