Skip to content

Comment on First algorithms, then interfaces

Comments

The Structure and Interpretation of Computer Programming has a very relevant comment about this exact topic:

Developing a useful, general framework for expressing the relations among different types of entities (what philosophers call ``ontology'') seems intractably difficult. The main difference between the confusion that existed ten years ago and the confusion that exists now is that now a variety of inadequate ontological theories have been embodied in a plethora of correspondingly inadequate programming languages. For example, much of the complexity of object-oriented programming languages -- and the subtle and confusing differences among contemporary object-oriented languages -- centers on the treatment of generic operations on interrelated types.

Ouch. This was written in 1996, but I don't think that languages like Java and Ruby have changed the state of the art that is being discussed. See http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-18.html... for the full context of this quote. (I was quoting from footnote 52.)

In an odd unrelated note, I've noted that there is some correlation between people's opinions on object oriented programming and how they eat corn. See http://bentilly.blogspot.com/2010/08/analysis-vs-algebra-pre... for more on this.

Spirals here. My programming is dominated by efficiency concerns - the whole point is to make it as short as possible, right? It's morally wrong to have waste. And in an information theoretic sense, a more compact representation, by encoding a simpler theory, usually better generalizes over reality - occam's razor (more parsimony.)

And this obsession is also a great weakness of course, because it makes central something that is not central. I have great trouble with some parsing issues (which I think is very algebraic - certainly regular expressions are), because it is just that little bit too complex for me to intuitively grasp the efficiency issues. Instead, I should use (inefficient) algebraic abstraction. But... it's just not quite natural for me, and I just can't quite grasp it.

Me: Spirals. Analyst. Lisper. Vim user (though I always used to be an Emacs guy until my tendons started complaining). Underwhelmed by object orientation. Looks like my mind would be well compressed by your algorithm. I'm very impressed.

>but I don't think that languages like Java and Ruby have changed the state of the art that is being discussed.

I would say Java has probably made it worse. Ruby is, however, (at least loosely) based on Smalltalk which IMO has the nicest OO library for the things it addresses (e.g. collections).

BTW: please submit this blog post! It's fascinating, and many on HN would appreciate it. I just checked, and it hasn't been submitted before (or, at least, it accepted the submission - which I quickly deleted.)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.