16 June 2006

Rules in interactive fiction (and the implications)

Read Natural Language, Semantic Analysis and Interactive Fiction, a paper by Graham Nelson.

Graham argues in favor of rules-based languages as opposed to object-oriented ones.

I concede that bundling properties together into object and class definitions, with inheritance from classes to instances, works well. My objection is rather to the doctrine that when components of a program interact, there is a clear server-client paradigm; that one component exists to serve the needs of another. The contents of a work of interactive fiction are typically not in such relationships. If facts concerning a tortoise must all be in one place, facts concerning an arrow all in another, how are the two to meet? It seems unnatural to have a tortoise-arrow protocol, establishing mutual obligations. Neither exists to serve the other. The tortoise also eats lettuce, meanders about garden locations and hibernates. The arrow also knocks a flower-pot off a wall. By the same token, the world of a large work of interactive fiction is a world of unintended consequences. New and hitherto unplanned relationships between components of the “program” are added in beta-testing, something which the programmers of, say, a spreadsheet would not expect.

But are new relationships among things really so rare? I don't develop spreadsheets; I develop distributed systems that have to interact with several other, very complicated systems. I suspect Mr Nelson is just being coy.

Update: This document might as well have been constructed to be maximally interesting to me. It touches on interactive fiction, programming languages, logic and math (model theory), and linguistics.

No comments: