On Static Types and Language Choice


I caught a little flack in response to my post calling attention to Steve Yegge's recent essay "Portrait of a Noob." In particular Levi thought I was out of line for endorsing something so inflammatory:

"People who approach programming differently than I do are insecure n00bs"

That's a great attitude for a professor to endorse in a public forum. Steve's rant is nothing more than hot air attempting to justify his personal preferences at the expense of others. It makes you feel good because his preferences are the same as yours. The fact remains, however, that there's no real meat; it's just the evisceration of a straw man.

Dynamic languages and agile methodologies (whatever those vague terms mean today) are great, but so are modeling tools and static program analysis. Different tools for different jobs, etc. No one needs to be called insecure or a 'n00b'.

From Phil Windley's Technometria | Types as Comments
Referenced Tue Feb 12 2008 08:37:20 GMT-0700 (MST)

We're not talking about your taste in clothes or furniture. We're talking about a way of working that can be right or wrong. This isn't simply a matter of personal preference. We like to wave it all away with "depends on the situation" kinds of comments, but that's a cop out for the most part.

I believe that there are styles of programing and of organizing large programming projects that are better than others--not simply a matter of style. Businesses, particularly small ones can gain significant advantages by choosing one language or style over another. This is not simple a matter of taste.

That said, circumstances often dictate choices. I'm in the middle of a project right now, for example, where the right architectural choice was to use the Apache Web server as the application server. That requires writing Apache modules and that means C or Perl. No other languages offer complete solutions in that space. (I chose Perl.)

A few specific comments on the Yegge article

  1. You need to read Yegge's entire article--or at least skim it--not just read the pull quote I used which is the most inflammatory part of an otherwise long article. Maybe you did...
  2. Yegge makes some interesting and useful points about static analysis and it's sometimes dubious value (yes, I'm now stating my opinion).
  3. Static type analysis is taken by so many people as "the right way" and dynamic type analysis as "the lazy way." I see part of my role as an educator to challenge that assumption.
  4. No matter what kind of type system you use, you need to think about types. That's part of programming. What level of tool support is appropriate depends in large part on what the programmer is comfortable with.
  5. That said, for large programming projects (which I am also leery of), static modeling allows the automation of large parts of the refactoring code and other tasks. More power to them.

So, in summary, I do think that Yegge's post (and many of his others) is delightful read that challenges many preconceived notions about types and forces exactly the discussion we're having now. "It worked!", I think Steve would say.