There’s a lot of features of Ruby that I like, but there are some that just drive me nuts like blocks not taking blocks and the ampersand operator. Raganwald did a great job of explaining blocks, procs, and the ampersand in this blog post: Explanation of Ruby’s Unary operator. I came away with the feeling, “Wow! It took that much explanation just to tell how to send blocks around?” If blocks were first-class citizens, Ruby would be more elegant. Raganwald would not be writing huge blog posts on block vs. proc because it would be unneeded.





A Rube Goldberg contraption does a simple thing (like making ramen) in an extremely complex way. It turns accidental complexity and irregularity into entertainment.

I feel for Blaine, I really do. When I first looked at Ruby, quite honestly I hated it. Not hated it in a Blubb-dacious “It’s not the same as my popular language” way, but hated it in a “The language is full of Accidental Complexity” way.To my eyes, Ruby as a language looked a lot like an internal IT app that is built as an aggregation of features. There might be a wonderful, coherent design in the implementation that I can’t see, but the interface I use seems like a bunch on one-off features that don’t play well together.Ruby definitely isn’t turtles all the way down . And I have never stopped being troubled by this. I lamented the fact that Ruby isn’t written in Ruby Twice . No, make that three times Deep breath. But.There’s a part of my personality that craves purity and regularity in a system. Purity and regularity have practical benefits, to be sure, but at the same time there are practical benefits to being messy and having special cases optimizing for things people do frequently. This is why design is freakin’ hard. It’s not as easy as following a bunch of rules that produce a system with the smallest possible intellectual surface area, otherwise we’d have stopped with Scheme and its five axiomatic special forms.Nor is it as easy as piling more features on regardless of how well they fit or whether people will actually use them. Otherwise Windows would have 97% of the market and OS X 3%. (Oh wait.)When it comes to design, sometimes you have to experience the result to judge it. You can decide whether a chair is attractive by looking at it, but you really need to sit in it a while to know whether you will feel comfortable using it. Even then, only long experience will tell you whether it is a keeper. Many things that are nice in the showroom are mediocre in day-to-day use.Design is all about problem solving. What problem do you think programming languages solve as a group? What problem does Lisp solve? Smalltalk? Ruby? For whom?Matz has said that Ruby is an attempt to solve the problem of making programmers happy. So maybe we aren’t happy with some of the accidental complexity. But can we be happy overall? Can we find a way to program in harmony with Ruby rather than trying to Greenspun it into Lisp?(I speak as a man working on rewriting code for Ruby: By far the hardest part of this is trying to provide the power of macros in a mechanism that works in harmony with the Ruby Way, rather than bolting Lisp onto Ruby’s side.)Programming languages also solve the deep problem of helping programmers think about the parts of a program that matter and not clutter their minds up with the parts that don’t matter. This is a very hard problem. Very, very hard. Make things too simple, have too few axioms and abstractions, and you end up with something where each element is extremely simple to understand, but any non-trivial program has too many elements with difficult-to-understand interactions and dependencies so as a whole programs are harder to understand.Does a regular language help us understand the parts of programs that matter more than an irregular language? That is not an easy question to answer. When I’m struggling with some subtle difference between Proc.new and lambda, I want to shout YES, GODDAMIT, GIVE ME SOME CONSISTENCY.I’m wary of trying to decide about languages based on infrequent edge cases. With a certain very popular language, I’ve made up my mind that the design choices don’t pay off, that the places where you work hard to express yourself aren’t places where the easy, obvious thing is easy to write and obvious to read. But so far in Ruby, the things that trouble me do seem to have some inherent trade-off merit. I can see how making blocks a special case makes certain eay, simple things easy. So is it overall the best possible design? I don’t know. is it a good design? So far it seems to be a reasonable design.At my core, I believe axiomatically that there is no one “best” language. That is not an excuse for saying that every language has merit. While I think that there can be more than one good language with different approaches and styles, I do not exclude the possibility that 90% of the programming languages in existence are stinkers through and through.Is Ruby better for me personally than Lisp or Smalltalk? I don’t know the answer to that question either.I decided a while back that I would give Ruby an honest try . And while I give myself the freedom to express my misgivings about some of the choices Matz has made, I also try to keep an open mind about them.It’s really freakin’ (I know, I used this word already) hard for me to to do, but I’m trying to find out if worse might be better . And I don’t mean, “Ruby is worse than Lisp, but it’s better for those n00bs over there.” That’s not embracing change. I mean I am trying to discover if worse might be better for me personally, and it is hard for me to open my mind to that possibility when I’m already invested in “better.”At this moment in time I have extremely mixed feelings about Ruby. I sorely miss the elegance and purity of languages like Scheme and Smalltalk. But at the same time, I am trying to keep my mind open to some of the ways in which Ruby is a great programming language.