TMI: Fun with polymorphism
May. 7th, 2012 05:13 pmI 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 )