I took first part of example from Peter Siebel book ‘Practical Common Lisp’.To understand it better I’ve tried to port it to Ruby and Smalltalk and see what I like and dislike about each. Bare in mind that Lisp is straight from the book written from a crazy smart person as far as I am concerned, and that my knowledge of all three languages is minimal.
Lisp
|
What I like :
- Property list syntax when making-cd
- Cool trick while dumping-db on the screen (list in list)
- Emacs doing auto indentation on my behalf
What I dislike:
- Not used to Polish notation
- That cool trick is cryptic
- File open - way to many params for default scenario to do
- add-record and make-cd two functions (It’s speculation, probably right but I like to stick to YAGN until proven otherwise). I get a feeling that this kind of speculation is part of Lisp culture (everything is generic), and I dislike it
Ruby
|
What I like
- syntax for hash in add_record that is emulating keyed params from Lisp/Smalltalk
- concise (perlisms)
- conventions (implicit self, no parentheses…)
What I dislike
- def/end is kinda ugly and eating up space, most noticeable for one liners. (Only thing worse from this would be Python ‘indentation’, it feels weird looking at Python code)
- I miss Smalltalk blocks [] that I could be able to end on same line
Smalltalk
|
What I like
- You have to go OO - no way around it
- Auto complete/templates while editing (Pharo)
- Keyed parameters in the message (addRecord) - great stuff
- Readability
- Nicer bock syntax than Ruby
- Image persistence (notice no db saving to file - it’s all in image)
What I dislike
- Editor is terribly slow
- Editor is trying to be smart (sometimes to much)
- Verbose (I know this is trade-off for easier reading)
- Image - it’s freaking me out, don’t listen to the lunatic from above that says it’s cool to have image.
I am doing all my stuff in Ruby, but after checking out Smalltalk it seems like a nice language without Perl influence. I think Perl influence might be bad for readability later, but I sure like perlisms when I am banging out code. Also I think the balance of perlisms is quite appropriate. As for Lisp it’s just not clicking with me (I am ‘trying’ to like it for third time). I am certain that I get the point of Lisp it’s just that I think that one property of being ultimately flexible is not that much of a deal that Lispers make of it.
All in all I think all three languages are great, but I will probably be sticking with Ruby. It’s not ideal, but it has pretty good balance, and probably is nicer to ‘normal’ people as Matz once said.