Tart status update

Monday, April 4, 2011
I'm continuing to spend most of my time working on updating the "Introduction to Tart" document. I'm about 2/3 done at this point.

I'm also trying to move some of the more complicated details into the language reference document. My writing style tends to have a lot of parenthetical remarks and "asides", and these can detract from readability, and I'm looking closely at these and seeing if they actually need to be there.

On the coding side, I've definitely determined the DWARF info being produced by LLVM is corrupted in some manner. I'm hoping to get some help on llvm-dev to figure out what is causing this.

I also added a "addAll(collection)" and "insertAll(collection)" methods to ArrayList.

The "undef" keyword can now be used to override a method in an interface. Attempting to call the undefined method will throw an UnsupportedOperationError. For example:

   interface List[%T] {
     def add(element:T);
   }

  class ImmutableList[%T] : List[T] {
     // Can't add to an immutable list
     undef add(element:T);
  }

Essentially what happens is that when the compiler generates the dispatch table for ImmutableList, the slot for 'add' is filled in with the address of "Object.__undefinedMethod()", which simply throws an exception.

0 comments:

Post a Comment