When I was 16 or so, I asked my older and wiser sister, Terry, to impart something she had learned in her smarter-older-sisterishness to me. She promptly told me that “everything is more complicated than it seems,” which, while not a very emotionally satisfying sentiment, has turned out to be awfully true. So, I am more than a little embarrassed when I find myself repeatedly oversimplifying things in yet another subconscious attempt to make myself feel smart and right. See, for example, my previous blog post.
The fancy term for my flawed thinking is “reductio ad absurdum” (http://en.wikipedia.org/wiki/Reductio_ad_absurdum) — the tendency to take a nuanced argument and take it to some absurd extreme, then to reflect back that the original argument was flawed because it lead to a flawed conclusion. It is the classic Rush Limbaugh pseudo-reasoning that I so deeply loathe (note the strong emotions I attach to it): Person X says Y. Person X is a liberal, and liberals are evil/bad/foolish, therefore argument Y is flawed.
Or, in the case of my previous blog post, Anders Hejlsberg promotes LINQ, but Anders sold his soul to Microsoft. Microsoft is an evil/bad/foolish monopoly, therefore LINQ is easily dismissed as some kind of Lisp wannabe. Mike is smart and right and all is well with the world. Ugh. Let me take myself off the psychotherapeutic couch and simply apologize for taking what was the beginning of an interesting discussion and reducing it to some kind of in-group/out-group oversimplified thing.
Yes, LINQ is Lisp-ish, as is Ruby. So you could argue that C# and .NET are rushing to catch up with Ruby, and you would be right. Just ask Don Box, who describes Ruby as “the leading alternative to C#” (and, by extension, I would argue that Rails is the leading alternative to .NET). In fact, this whole discussion is handled with more clarity on Box’s blog than I could begin to pretend to have — but don’t go there yet. I will give you a link at the end of this post.
Don Box, who designed COM — the very underpinnings of Windows — even goes as far as to say that they are not just “marching headlong into the past,” to learn the lessons of functional programming before OOP distracted us all, but that he and his associates “anxiously await the past and are doing what we can to get us there :-)” New language features in C# make it look more Lisp-like every day, and Don talks openly about what he loves in Ruby, but the syntax in C# is a bit painful to look at.
Box’s endorsement of Ruby specifically and functional programming generally is something that should make every Rails developer feel smart and right, but there is a deeper undercurrent in these discussions that troubles me. There is a sense that OOP is dead, or at least that one should strive to think in terms of functional programming to gain the re-use and elegance we all thought we could grasp, but never quite got a grip on with OOP.
But, after so many years of object-oriented thinking, how do you begin to think functionally? I have the sense that Domain Specific Languages (please, let’s call them mini-languages or meta-languages, ok?) and the power of Ruby mixin’s come into play, but I can’t see the whole picture yet.
All of us — you, me, Anders, Don, Jon Udell — we all agree that the compact expression and flexibility of functional programming, as expressed in some parts of Rails and in LINQ, is way cool and The Way to Go. We all get that Lisp is the Velvet Underground of programming languages — huge in terms of influence, if not exposure. The question is, how should this impact workaday programmers like me? How does that change the way we think about and write solutions for line-of-business apps? The question we will need to be answering for years is, how do you go from OOP to functional programming?
BTW, I lost Terry when I left Jehovah’s Witnesses — their hateful shunning rules are so wrong — but I promise to keep trying to remember what she taught me. Things are never as simple as they seem, and making programming more enjoyable transcends vendor allegiance and language loyalty.
Love you, sis.
Don Box’s blog:
This article sprang from a link on Reddit