Jan 27 2004
Java Interfaces and Python Mix-ins
If I haven’t said it before, I’m now a computer science Graduate student at Depaul University here in Chicago. I decided that I’ve played around with computers for long enough that I need to buckle down and get some credentials, as my BS degree in Political Science doesn’t really impress resume readers.
My first class is Java. So far, so good. I sometimes get frustrated when I think of how much quicker I could complete my homework in Python, but I just push those thoughts down and get my nose back on the grindstone.
Last night, we started in on Java Interfaces, I found this article on Google, http://www.artima.com/designtechniques/interfaces.html, although I haven’t read it, I figure it’s a good introduction to the concept of interfaces. So, links aside, interfaces confuse me.
I’m trying to map them to a Python-ish concept, and can’t really do it. For a while I was thinking they may be like “mix-ins”, a concept that I haven’t totally wrapped my head around. For an overview of Python mix-in’s: http://www.linuxjournal.com/article.php?sid=4540.
Thinking it through a bit, I believe that the concept of interfaces is really just a Java construct, and is “doable” in Python without explicitly stating it. Are interfaces really just an outgrowth of strong typing? That’s what I’m leaning towards this morning. We’ll see.



