Linguists recognize that speech occurs in different modes or registers, which serve different purposes:
- Intimate: used with very close friends, family members, and romantic partners, it relies on a significant amount of shared history.
- Casual: used with people one meets frequently in unstressful contexts. Word choice is general or colloquial, and it also relies on shared history.
- Consultative: a more formal way of speaking commonly used in teaching or when talking with authority figures.
- Formal: more often written than spoken, it is more strictly grammatical, and is used in public speeches, business presentations, and so on.
- Ritualized: including wedding vows, oaths of office, and other speech acts in which the words don't change.
What strikes me in looking at this list is that most person-to-person speech is "casual" or "consultative", but programming is always "formal" (new code) or "ritualized" (boilerplate) because we don't share history with our computers and they can't understand what we're implying, only what we're saying. It's easy to create aliases, macros, and other shortcuts, or to mimic the grammar of natural language (think SQL or Perl), but when we do that we are actually just creating mis-matched speech acts: what looks casual to use is interpreted as formal by our "listener".
I wonder to what extent this mis-match fosters and nurtures Roy Pea's "superbug": the belief that the computer is like an intelligent human trying to discern our intentions. And I wonder what a genuinely casual programming language would look like—my first thougth is a horrible mash-up of every bad auto-complete tool I've ever been subjected to, but surely there has to be something better.