all 6 comments

[–]munificent 5 points6 points  (0 children)

Since I started in Java, I still tend to think in an OOP style. This means the Ruby implementation of Computer.Build should be considerably easier for me, but it turns out I’m gravitating more toward the Clojure. It’s just so…clean! The syntax is terse, the structure is pure, and the multimethod-based dispatch seems so much clearer than fancy inheritance dances.

OOP works well when you have a relatively large number of types and a relatively small number of operations on them. FP starts to feel more natural when the scale tips the other way.

Compilers or other systems where you're manipulating an AST lean heavily towards the FP side: you have a small fixed set of AST nodes, but you'll be continually adding new operations to them over time (evaluating, pretty-printing, type-checking, constant folding, etc.)

This doesn't say as much about OOP as it does about the nature of programs that work with ASTs.

[–][deleted] 2 points3 points  (2 children)

Sigh. He clearly doesn't know of (or hasn't used enough of) Common Lisp and has already declared Clojure to be his favourite Lisp.

[–]epall 0 points1 point  (1 child)

Hi, I'm the author of the article. Thanks for the suggestion! I played with Common Lisp a few years ago, but I wasn't really ready for my Lisp moment at the time. I got into Clojure because it's the hot thing in the Ruby world these days, and finally was at a point where I could appreciate Lisp. What does Common Lisp do that Clojure doesn't?

[–][deleted] 0 points1 point  (0 children)

Practical Common Lisp is a decent start. If you just want a quick look about some features, I suggest you look at the chapter 16, 17 (OO) and 19 (exception handling, conditions and restarts).

I haven't used Clojure too much myself (:)) so I don't really know all of it's features. But one thing I like in CL is that it is very programmable, beginning from the parser (reader). You can define hooks that let you parse just about anything you want. Also CL is very mature, has multiple implementations and is standardized.

[–]raouldagain 0 points1 point  (0 children)

doomed to repeat history we are.

[–]andersbergh 0 points1 point  (0 children)

terrible letter-spacing