Read on and leave a comment
or return to our portfolio.

6 Jun 2006

by Noel

OO is convenient

One of the recurring themes of the Dagstuhl workshop was “convenience matters”. This is clearly true. All Turing complete programming languages have equivalent power yet we prefer some over others. It’s about what they make easy.

This point came to mind when looking at the various abstraction mechanisms in PLT Scheme. The designers of PLT Scheme have analysed the types of abstractions people often use, carefully separated them into different classes, and provided separate mechanisms for each class. If you want to create a unit of functionality you can use the module system. If you want to parameterise code you can use the unit system. If you want to dispatch on type you can use the OO system. This is in contrast to Java, where you get one main abstraction mechanism, the class, which is a module system, a way of parameterising code, and a dispatch mechanism all mashed up into one. This is considered undesireable as you are forced to consider interactions with other mechanisms when you only want to use one. However it has one big advantage: convenience. I don’t often use PLT Scheme’s unit system, so when I do I have to look up the documentation. Same with PLT’s OO system. This tends to make me avoid using them, as I don’t like to spend time reading the docs or figuring out the system. However with Java you’re always writing classes, so it’s familiar and the barrier to use is lower. Convenience matters.

Posted in Web development | No Comments »

Comments are closed.