Cleaning up behind the scenes

  • Jan 25, 2013
  • 0 Comments

At the end of last semester, I demoed an early version of implicit interfaces showing three characters of different types getting their own method called.  While it looked impressive, you could not save and reload the world without LookingGlass exploding, and it would only work if your method had the name "mySecret".

My work so far this semester has been cleaning up some of the messiness that caused those problems and limitations.  Now you can save the world!  Also, you can name your custom methods whatever you want, and so long as every character in the for loop has it, you can call it on the loop variable.  I am currently working on getting rid of the need to specify a type for the loop up front.

I watch for when a method gets called on the loop variable, and then I catch it and redirect it to the correct method for the current character being represented by the variable.  This turns out to be much easier for user created methods rather than methods like "say" and "walkTo".  Since these methods are actually written in Java rather than in LookingGlass, you don't have a nice way to get to them or hand them around.  My major next step is to decide how to deal with this issue.

Another next step is to dive into croquet in order to get the mini-gallery of local variables up and running.  So far, the going has been slow on this front, but I'm hopeful to get some help and make some headway this coming week.

Comments

  • No comments yet

Log In or Sign Up to leave a comment.