Friday, July 04, 2003

First-class objects

First-class objects, you might recall, are those that a system can manipulate as a single item. In programming terms, it's a type that can appear on the left hand side of an assignment statement.

There are too many useful things in computer systems and interfaces that aren't reified as first-class objects. For example, the current state of a GUI, with the windows in a current position, with certain dialog boxes open, with something highlighted. Why can't I save this as an object? It might be especially useful for sending to tech support.

What about a configuration change? Microsoft Word, famously, has a zillion possible configuration states, with all sorts of options turned on, off, or set to something. Often, finding those settings is very difficult, even if you know what it is ("How do I turned off autonumbering?"). But it's very difficult for me to communicate the answer to someone else other than by giving them a multi-step process of changing the configuration. Why isn't "autonumbering off" a first-class object? Why can't I mail it to a colleague and have them automatically apply it?

How about tasks? Users are first-class objects in most operating systems (now that Windows XP belatedly brought Microsoft up to speed), but as Whitman (Walt, not Christie), "I am large, I contain multitudes." (Maybe Christie would say that, too.) Sometimes I'm using my computer to have fun, sometimes I'm working on consulting project A, sometimes I'm working on consulting project B. Often I do all three of those things in a day, and switch back and forth. Why can't I package up the state of my system just as I like it for one project, wad it up in a ball, and keep it on the shelf for when I'm ready to get back to it? Why must I open up all the new editor windows, go to the same web pages, and move windows around every time I restart my work?