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

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • jaunty upgrade

    Upgraded to Ubuntu Jaunty. X hung with garbage on the screen after rebooting. Booted into "restore mode" (I forget the exact name), it gave me a…

  • ubuntu summit

    There's an Ubuntu summit going on in Mountain View next week. I'll be there Monday and plan to meet up with someone who's interested in packaging…

  • 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.
  • 12 comments

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • jaunty upgrade

    Upgraded to Ubuntu Jaunty. X hung with garbage on the screen after rebooting. Booted into "restore mode" (I forget the exact name), it gave me a…

  • ubuntu summit

    There's an Ubuntu summit going on in Mountain View next week. I'll be there Monday and plan to meet up with someone who's interested in packaging…