BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Talks.cam//talks.cam.ac.uk//
X-WR-CALNAME:Talks.cam
BEGIN:VEVENT
SUMMARY:Interoperability in a Scripted World - Kathy Gray
DTSTART:20100816T114500Z
DTEND:20100816T130000Z
UID:TALK25438@talks.cam.ac.uk
CONTACT:Sam Staton
DESCRIPTION:Scripting languages\, such as JavaScript\, are used to quickly
  and easily develop small programs. Frequently\, these programs are combin
 ed with libraries and other programs from "conventional" languages\, such 
 as Java\, to build\nlarger and more robust applications.\n\nBridging the g
 ap between languages requires data conversions and runtime checks at the b
 order. Relying on programmers to write either is tedious and can introduce
  subtle errors\, so instead we add language and compiler support for the b
 order-crossing operations. Current techniques only support combining langu
 ages with similar data representations and runtime semantics\, which exclu
 des popular language combinations.\n\nIn this talk\, I will explain the cu
 rrent state of interoperability and then present advances which support co
 mbining Java and JavaScript. These languages have different means of inher
 itance\, representation\, and operations -- Java\, with class-based extens
 ion\, separation of fields and methods\, and a statically fixed structure\
 , and JavaScript\, with prototype-based extension\, uniform members\, and 
 fully mutable structure. To allow a Java object to pass to JavaScript\, I 
 use a contract-like embedding which causes the JavaScript program to treat
  the value as a JavaScript object\, and vice-versa. This allows programs w
 ritten in languages with differing semantics to cooperate in one program s
 afely and soundly.\n\nClass-extension and prototype-extension are the two 
 predominate means of inheritance in the object world and programs using ex
 isting libraries may need to support extension through the appropriate sty
 le of inheritance. I show how we can mix these two styles\, with the contr
 act-like embeddings preserving safety-properties and data representations 
 across inherited methods and fields.\n
LOCATION:Room FW26\, Computer Laboratory\, William Gates Building
END:VEVENT
END:VCALENDAR
