Sunday, October 10, 2004

Verbs, verbs, verbs

Mark Nottingham speaks sagely on the subject of verbs.

I'm very dubious about Don's assertion, mentioned by Mark, that once you get (no pun intended) uniform interfaces based on verbs, you see the benefit of creating domain-specific, verb-based interfaces.

I for one, haven't ended up there. I believe it essentially leave you back more or less where you started. You end up with domain specific interfaces and hard-coding N-squared awfulness to interlink domains. I don't see how it is any better than, say, having a abstract base class for a domain that specifies pure virtual methods for each of the verbs and then a bevvy of concrete classes supplying implementations of those verbs. The sort of thing OO-based distributed app designers have been doing for a long time now.

I've been reading some stuff lately that leads me to think that the "proof" (if that is not too strong a word:-) of the pan-domain uniform interface argument will eventually come, not from comp. sci. but from linguistics and the social sciences.

Here is a quick Gedanken based on some stuff I read by Stephen Pinker lately:
Are the phrases "Sean loaded the wagon with hay" and "Sean loaded hay onto the wagon" the same or different?

On the face of it "wagon" sure looks like a resource/object and "load" sure looks like a verb/method.

So, what would this mean?


Now replace "wagon" with "wall", "load" with "splash" and "hay" with "water".

    wall.splash ("water")

In the case of the wagon and the hay, the order of the object and the verb affects the semantics of the statement ("Sean loaded the wagon with hay" sure sounds like afterwards, the wagon was full up whereas "Sean loaded hay onto the wagon" does not imply that the wagon was full afterwards.).

In the case of the wall and the splashing water, the order of object and verb does not affect the semantics.

Given a choice, I would "post" hay to the wagon and "post" water to the wall because all semantics of exactly what that means are attached to the resources - not implied by the precise choice of words in the verbs.

No comments: