An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Why I Love Programming (Part 94)

August 16, 2010 ·

As I often tell people, the reason I love programming is because we (sometimes) get to solve hard problems.

I've blogged about my love affair with Scala as part of my "Learn a new language every year" commitment and I will admit that it's a more challenging language than, say, Java but that's part of its charm: it makes you think! I'm a bit advocate of learning new languages that make you think differently because you can bring that back to your 'favorite' language and it'll make you a better programmer. In the past, I've advocated APL, Prolog, Haskell because they're all very different to what you're used to. So, Scala brings some new challenges because it's a mixture of Object-Oriented and Functional Programming and it has an extremely strong type system. I love the Scala mailing list because it has some really interesting (and challenging) threads that make my brain work harder than usual.

A few days ago, someone complained on the mailing list that one of Scala's library types was "unsafe" because of one of its methods. What followed was a fascinating discussion about types, consistency and Turing completeness (which is kinda fundamental to all our programming efforts - or at least our debugging efforts :)

As the thread unfolded, one of my favorite list members, Tony Morris, explained why the method had to exist (OK, that's a simplification) and backed it up with a detailed analysis. I've read through the thread several times and I've also read a blog post from Tony several times and it's very instructive. Instructive enough that I feel the need to share it.

Here's the entire thread on the mailing list. Pay particular attention to Tony Morris's posts. Here's Tony's blog post about the proof behind his contribution to the thread on the mailing list.

I hope you find some nugget of interest in this and that it may interest you enough to learn more outside your comfort zone - that's why I do Scala!

Tags: programming · scala

1 response

  • 1 Edward T. // Aug 19, 2010 at 7:00 PM

    Thanks for the reference, Sean - since I know nothing about Scala, the conversation was difficult to follow, but I did appreciate Tony's comments. It's too bad that I don't know it, however, because I got the feeling that in generalizing Sean's original question, the point about whether it was a good choice in that *particular* case got lost. Since I don't understand the Option function, I wasn't in a position to evaluate suggested alternatives (e.g., vs. a List). But, then again, I only read the thread once. At least I now have my contractions punctuated correctly.