Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I read that Kent Beck said something like "I always knew one day Smalltalk would replace Java. I just didn't know it would be called Ruby."


I've heard it claimed a number of times that Ruby/Python are SmallTalk-esque.

Can anyone speak to that? In what ways is that so?

I've also read Peter Norvig claim that Python is a LISP with C-Syntax, so I'm not sure what to think.


It seems that programmers take their favorite feature of a programming language for comparing it to others:

If you like first-class functions, then Javascript becomes "Scheme in the browser." If you miss having a REPL and then discover Python, it becomes "LISP with C-syntax." If you like objects responding to arbitrary messages, then Ruby is "Smalltalk without images" and so on.


The similarities between Ruby and Smalltalk basically consist of them sharing the notion that everything is an object, every operation is (or, in the case of Ruby, can be) a message sent to an object. Ruby has some control structures like if, while, etc. that Smalltalk didn't, however it's got the basics (blocks, methods, classes) that allow you to directly translate Smalltalk code into Ruby (it has things like if_true, if_false, etc. that were how you did conditionals in Smalltalk, even if the idiom would be to use the special if form).

Python doesn't quite fit as well, since it doesn't have arbitrary anonymous code blocks (lambdas are a bit limited), and classes aren't as open once they've been created (I think?).

The big difference is that Ruby is a language that runs on regular machines, calling out to C routines to interact with an external OS, whereas Smalltalk is an integrated language and OS that run together (similar to lisp on the lisp machines).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: