Re: [Caja] Fwd: quick look at Caja vs. GWT's output
"Andrea Campi" <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
On Jan 22, 2008 10:11 PM, Mark Miller <[email protected]> wrote: > > Interesting discussion about Caja, GWT, and Joe-E starting on the > e-lang list. To subscribe: > <http://www.eros-os.org/mailman/listinfo/e-lang> > > > ---------- Forwarded message ---------- > From: Lex Spoon <[email protected]> > Date: 2008/1/22 > Subject: [e-lang] quick look at Caja vs. GWT's output > To: [email protected] > > > > I looked over the Caja doc a few days ago, mainly at the informal > overview at the beginning, trying to figure out if the Google Web > Toolkit (GWT) can be modified to emit Caja. I'm posting here, because > it's a cross-language issue. > > Background, for those needing it: > - GWT is a Java->JavaScript translator developed at Google. You write > Java code, and it translates it to JavaScript > > - Caja is an objcaps subset of JavaScript that is also developed at Google. > > - Joe-E is an objcaps subset of Java. > > Currently these projects have no relation. It would be neat if (1) > GWT could emit Caja, and (2) GWT could, when given Joe-E input, could > emit Caja that parallels the structure and security properties of the > Joe-E input. (more on that in a few minutes). > Great idea, and very interesting indeed. > There do appear to be some non-fundamental yet time-consuming issues > to fix up. In particular, the naming issues are quite likely to run > into stumbling blocks here and there, simply because GWT is not > careful about naming right now. Also, all fields will probably need > to get automatic getters and setters, because GWT input is arbitrary > Java code. > > More speculatively, GWT could also have a switch for Joe-E source > files. In such a mode, probably the automatic getters and setters > would not be necessary. That's a later project, though. The first > thing, it would seem, is to check whether GWT can be coaxed into > emitting Caja at all. Well, I'm just speculating since I don't know GWT internals at all--but I guess translating Joe-E source would mean you can work under tighter assumptions, and that might simplify this effort. In other words, if you assume your input is valid Joe-E input, you can avoid implementing GWT code to deal with translation (or rejection) of non-Joe-E Java. I have no idea how big that subset is. > To firm up this view, I would next like to run GWT's output through > the Cajoler and see what it says. I could not find a pre-built > Cajoler last Friday, so I stopped for now. When I find another time Try the online translator: http://www.webcom.it/blog/online-caja-translator/ Bye, Andrea