Scott Collins on Computer Language Design
First of all, if you ever have the chance to hear Scott Collins give a technical talk (or any other talk, for that matter), you have to hear him. His wealth of knowledge and his speaking style make difficult problems approachable.
His discussion was on the development of computer languages, and the future of programming languages. He started with the definitions of the problem domains, machine languages, and you (the programmer). These three areas have quite a bit of distance between them. You bridge these three areas using computer languages, libraries, and your programs.
What you can learn from that is that all languages (even general purpose languages) have a grammar and contain first-class types that shorten the distance between its chosen problem domain, and you, and the machine.
You can see this in some historical examples:
- FORTRAN was written for mathematics.
- PERL was written for sys admin tasks.
- LISP was written to explain how computers work.
By picking the language that is ‘closest’ to your problem domain you do gain some advantage. But, you can build anything in any language.
However, some languages are closer to the problem domain (see Mathematica) than others. That is (at least in part) because Mathematica is more like a domain language than a general purpose language.
When you build large programs you are building your own domain language. Think about this: Your team doesn’t ask questions about how to fashion loops, or how to add numbers. Rather, they are asking questions about how to use the code and libraries your team has already implemented. Language features help you create these domain languages.
This is important, because you are a language designer. It's not a general purpose language, rather, it's the language for your chosen domain. That might be a product suite, it might be a framework, or it might be some assemblies used in a set of internal tools.
One of his key points is that you can learn a great deal about software development by expeanding your horizons, and looking for, and at, other languages and design metaphors. If you really want to grow, stop thinking of anything as ‘the answer’, and think of it as ‘one answer’.
There are some real differences in computer languages that help you build your own domain languages:
- Can I implement type as good as built-in?
- Can I treat code like any other value?
- Can I control object lifetime?
- Can I build new types at runtime?
- How much type knowledge at runtime?
- Can I build new types as runtime?
- Is it up to the task?
- How smoothly can I integrate my code into the language vocabulary?
There is also critical mass: Is it in use in the wild? (For example, Latin is cool, but very few people use it)
He added a great satirical look at many of our current languages. Why was it written? Who used it? What did they do it for? That's important, because your users want a language too. (For example, emacs is a language: For editing.) Give it to them.
So, here’s some conclusions:
- New languages will keep coming.
- Old languages will continue to change.
- The very things you like about your language are the very things that make someone else hate it.
- Most arguments are about ridiculously small points.
On design:
- Choosing the right language is less important than building the right language for your problem domain.
- Apply the right parts of the team to the right parts of the language.
- Building your design as a language helps you solve problems more elegantly.
- Your program is a part of the users language. Give it to them.
So, we are all language designers. For our teams, for our users, and for other people.
The question period was hilarious. But, I was laughing too hard to take good notes. I will say it's the only time I've heard the words "pupperoni" and "Objective C" in the same sentence.
Ann Arbor Computer Society Home Page
It's been an impressive group over time