[e-lang] translating one objcaps language to another?
tyler.close at gmail.com
Wed Jan 23 13:19:06 EST 2008
On Jan 22, 2008 5:20 PM, Mark Miller <erights at gmail.com> wrote:
> On Jan 22, 2008 12:18 PM, Lex Spoon <lex at lexspoon.org> wrote:
> > Does anyone know of a compiler that goes from one object capabilities
> > language to another?
> A first step is to decide on a mapping of basic Java (or Joe-E) types
> moment, we already have at least four(!!) mappings between these two
> * GWT provides a JS Native API, allowing Java code translated to
> * The browsers provide LiveConnect
> web page to talk to Java applets on that page.
> mapping each language onto Waterken's JSON/HTTPS-based protocol.
Waterken, one for pass-by-construction objects and one for
The pass-by-construction mapping is described at:
There's an example of the pass-by-reference mapping at:
The pass-by-reference mapping needs more documentation, but is pretty
simple, so I'll describe it here. The goal is only to pass invocation
the simple name of the invoked method and an array of arguments.
There's no support for method overloading, such methods are treated as
if they do not exist.
I think the pass-by-reference invocation marshalling is very similar
to that done in Rhino, but without the support for method overloading.
IMO, supporting overloading across different languages is just too
tricky and so best avoided. I've written code to support overloading
in the past, and the complexity was just not worth it. AFAIK, Rhino
doesn't pass data over the network, so it doesn't discriminate between
pass-by-construction and pass-by-reference. I think my implementation
of pass-by-construction provides an interface similar to the one Rhino
provides in the local only case. The difference is the absence of any
methods; only fields are transported over the network.
I don't know the details of the other listed mappings, so I look
forward to reading the rest of this discussion.
Use web-keys for RESTful access-control:
Name your trusted sites to distinguish them from phishing sites.
More information about the e-lang