Tuesday, July 12, 2005

Beyond OOP

One of the questions that frequently comes up during the expert panels at No Fluff, Just Stuff is "What Comes Next?" What, in the opinion of the speakers, is the Next Big Thing? Consequently, I think about this probably more than most developers just so that I'll have a lucid answer at these panels.

One of my favorite characteristics of college was the accidental synergy that occurs between classes that you happen to be taking in the same quarter. For example, I took the automata class the same quarter as the compilers class, and there are obvious common elements. Even something as seemingly unrelated as artificial intelligence and philosophy creates a fertile ground for interactions.

So, how are these two things related? Lately, during my constant ruminations about What Comes Next, I've seen an interesting synergy between two separate but related concepts. Language oriented programming, my new favorite geek obsession, is one. It addresses the disconnect between the hierarchical nature of OOP and the rich semantics of language. The other day, I was talking to Obie Fernanadez, a fellow ThoughtWorker, and he is really into RDF and the Semantic Web. He's dealing in hierarchies, but in a different way. I am probably greatly injuring this assertion by my newness to this subject, but the Semantic Web folks maintain that, among other things, the problem with OOP is that it is basically context free. Hierarchies exist, but they don't relate in the rest of the world with other hierarchies -- each inheritance tree is an island. And properties that exist on classes don't have any context outside the class. In the real world, "address" can have separate meanings based on the context -- are we talking a physical place or a inaugural speech? The way our minds work isn't like OOP, where everything exists in a strict hierarchy. We have these "free floating" concepts like "address" that can be attached to the correct context. What's needed is context...and that's what the semantics of language provides that OOP doesn't already have. Now, this week at least, I'm thinking that What Comes Next is related to both language oriented programming, which provides needed context to the structure of programming, and semantic ontologies, which provides global context. These are fundamentally different things, but seems like there is some synergy to be found. More later...

2 comments:

Anonymous said...

You might find the following resources illuminating:
- http://norman.walsh.name/2003/06/01/xmlnotoo
- http://jroller.com/page/cv/20040321#the_prototype_based_ducks
- http://www.helsinki.fi/~jppesone/papers/kandi.html
- http://lieber.www.media.mit.edu/people/lieber/Lieberary/OOP/Delegation/Delegation.html
- http://citeseer.nj.nec.com/taivalsaari96classes.html

These are simple, proven ideas that can make a massive difference to the fidelity of our object models to business domains. Unlike the LOP stuff these (prototype based programming and ReST) are simple ideas which don't require massive amounts of infrastructure to get off the ground.

Compare this: http://iolanguage.com/about/simplicity/ and this: http://iolanguage.com/about/samplecode/ to the MPS/Software Factory ideas.

Anonymous said...

What you're talking about sounds like "Subject Oriented Programming", which was implemented in Self and is also implemented in Slate.

It's also a bit like multiple dispatch, which is implemented in CLOS, Dylan and Slate.

By putting them all together, along with dynamic delegation and prototypes, Slate lets you define what happens when a message is sent *from* an object of one type to a group of objects of other types, and lets the type of individual objects change over their lifetime.

Also, the syntax is extremely expressive compared to popular modern languages.