j2js

 

PresentationMoreComplicatedStuff

Page history last edited by Anonymous 4 yrs ago

More Complicated Features

 

Instance Variable Initialization

 

* Need to inline any instance variable initializers into the constructor. Not too hard.

 

Packaging

 

* Need to come up with some sort of namespace similar to a Java package. Also not too hard.

 

Method Overloading

 

* For certain overloaded methods, could create a mangled method name for the overloaded methods and then have the original method dynamically dispatch to one of the overloaded versions based on the number and types of arguments. Other ways to do it as well that aren't as versatile. Starts to get tough.

 

Dependency Analysis

 

* Since you're really writing code that generates a class, rather than writing a class, and since JS has no sort of built-in packaging or library loading, you need to make sure that all supertypes are defined before their subtypes and that any class is defined before anything else that references it via a static property. There might be other ways to deal with this, but I figured the easiest would be to anaylze the dependencies between a set of classes and then just spit out the files in the right order. Also a bit tough.

 

Next: PresentationImprobableButCool

Comments (0)

You don't have permission to comment on this page.