Public resources for ECMAScript Edition 4

The ECMAScript group has created some public resources for the Edition 4 design and specification process. We've released a public export of the group wiki and started a public mailing list for discussion related to ECMAScript Edition 4.

Keep in mind this is an ongoing process, and we've preferred to release information early to integrate community feedback into the process. As a result the documents are not in their final state, and none of these documents should be considered authoritative yet.

You'll find most of the activity, and the most up-to-date material, in the proposals section. There's a fair bit of information under discussion and clarification as well.

Here's a small sample of proposals that members of LtU might find particularly interesting:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

So... prefix notation coming

So... prefix notation coming to ECMAScript 5? :-)


You're giving away the plan!

does anyone do standalone

does anyone do standalone programming with ecma/java-script? i've used it quite a bit recently inside browsers and i was wondering about using it "standalone" as "just" a programming language. i know there's rhino, but that seems to be intended for embedding.

Windows only

In Windows you can just double click .js files and they will run with Windows Scripting Host. It's a very nice way to write batch files.

You can compile JScript with .net to make a standalone executable.


I've seen two largish projects in the while that did backend business logic with JavaScript. The idea was that it would be easier to modify for (non-existent) different customers than Java and that a lower level of developer would be able to do so. Said lower-level developers were of course available from the Three-Letter-Company-Global-Services-Branch that built the projects in the first place.

The JavaScript in question was triggered from servlets, included callouts to Java for data access (via JDBC and SQL), and produced XML which would be munged by XSLT for presentation (which of course included client-side JavaScript as well). The architecture serves mainly as a useful reminder of just how wrong DSL backers can possibly be, and why JSP isn't as bad as you thought.

Completely off-topic for this thread, but...

I find PostScript an interesting language. While I haven't programmed in it really, what I see looks interesting (though, for me, I doubt I'd feel (personally) "comfortable" with it; for me it would be more an interesting toy). How many people have used PostScript as a (more) general programming language? Experiences? People who haven't really looked at PostScript as a language, give it a look.

Completely off-topic for

Completely off-topic for this thread

Right. So why did you post it here? If you really want you can open a new thread, or revisit one of the older htreadas about Postscript (there are at least a couple of them).

Right. So why did you post

Right. So why did you post it here? If you really want you can open a new thread, or revisit one of the older htreadas about Postscript (there are at least a couple of them).

I didn't/don't expect too large a response, so didn't think it worthwhile to start a whole new thread; however, I certainly would start one if there did seem to be strong interest. Further, it isn't as off-topic as I said; it does relate to using an application-specific language as a general purpose one. Searching now, there don't seem to be any threads with postscript as a topic (according to the LtU search box), there is maybe one or two where this might somewhat fit in better. However, if you like I can start a new thread.

We have a DSL department

We have a DSL department which contains quite a lot of stuff about "application-specific language".

re Postrcript here a couple of links I dug out for you: #1, #2 (link should now point here).

But I can't reply to either

But I can't reply to either of those threads and the intent is postscript as a general purpose language. Anyway, I'll post it as a forum topic soon as that will resolve the issue.


Couldn't care less about the rest -- program transformation and code generation takes care of it. But real tail calls are a must.

Try harder.

Just transform and generate away all functions.


These enhancements are promising, although I'm not sure that classes are appropriate for a delegation language ;-)

In my experimental language, I've added some metaprogramming features ( meta- not macro- ) like currying, concatenation ( f(x) + g(y) yields fg(x,y)={ f(x); g(y) }; ) and runtime inlining : Here is a JS-ized example of a Power function :

var Power=function(n) {
var S
if (n==0) return function(x){ return 1 }
if (n==1) return function(x){ return x }
if ((n&1)==0) {
return fusion(function(x){ S.infusion; var Z=S(x); return Z * Z; })
return fusion(function(x){ S.infusion; return x*S(x) })

For Power(14) it yields something like function(x){ return ((x^2 * x)^2 * x)^2 }
The metaprogramming stuff does VM bytecode transformations. Here "fusion" triggers the transformations and "infusion" tags the functional variables to merge. Usually nonlocal variables cannot be optimised or tranformed significantly by the bytecode compiler.

Well, you may think this is totally off topic but actually, it is not that much as my language is both syntaxically and semantically close to JavaScript. I think that kind of metaprogramming could be rematively easily added to VM based languages like JS with many cool uses. It is quite efficient as you don't have the burden of elaborating ASTs manually and running a slow parser or compiler, bytecode transformations are relatively easy to implement and it can be syntax and type safe.

For a JIT enabled VM, it necessitates keeping the VM bytecode of compiled functions. Some fallbacks are also needed for non inline-able foregin functions. Maybe automatic AST tranformations are possible for AST based implementations, like the KDE JS engine.

Maybe one of the PL gurus here could hint me a language with similar metaprogramming features ? Is it related to optimising functional languages compilers ?

( BTW, is this post beyond the defined off-topic&rant level ? )

is this post beyond the

is this post beyond the defined off-topic&rant level

IT seems fine to me. It is slightly off topic for the current thread, but not extremely so (and you can start a separate thread if you want, of course).