2012-05-07

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (working)
2012-05-07 05:13 pm
Entry tags:

TMI: Fun with polymorphism

I didn't get to writing a blog post on Friday, since I had a couple of interruptions and didn't get that much code written anyway. The main news from Friday is that classes can now implement parameterized interfaces! This was a pretty minor fix. That is to say, I can write:

class cat implements map<int, str> {
... }

which says that the type cat supports table- or map-like operations mapping integer keys onto string variables. Why a cat would support that, I don't know, but it's just an example. I went on to write a test like this: Cut for length )