Evan Martin (evan) wrote in evan_tech,
Evan Martin
evan
evan_tech

on being too clever

One thing I like about writing C (and the nearly-equivalent restricted subset of C++) is how stupid the language is. It's counterintuitive at first, but because of the weak expressive power of C it's rare to have more than a few ways to do something: first you allocate some memory, then you fill it in, maybe with a loop, and then you return it.

Contrast it with higher-level languages. You see a pattern and you start to generalize. The Lisp people want to start with writing a system of macros; the Ruby people want to start "metaprogramming DSLs"; the Perl people start shoehorning in OO or Moose; in Haskell I start thinking I could write the code more point-free or with monads or with arrows or (today's new technology flavor!) applicative functors.

At some point you have to draw the line, but it's never quite clear where. Is this shortening leading to clarity or to golfing? With C, it's easy: you always just do it the stupid and verbose way. I wonder if this is part of the appeal of Java.
Subscribe

  • blog moved

    As described elsewhere, I've quit LiveJournal. If you're interested in my continuing posts, you should look at one of these (each contains feed…

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • treemaps

    I finally wrote up my recent adventures in treemapping, complete with nifty clickable visualizations.

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 11 comments

  • blog moved

    As described elsewhere, I've quit LiveJournal. If you're interested in my continuing posts, you should look at one of these (each contains feed…

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • treemaps

    I finally wrote up my recent adventures in treemapping, complete with nifty clickable visualizations.