From: Nat Pryce Date: 2002-04-23T00:19:43+09:00 Subject: Re: Ruby as Smalltalk From: ";" > In article <001c01c1e8d4$0290f650$0100a8c0@backpack>, > - - This seems to be the main critism of ex-smalltalkers when they > first look at Ruby. However, you can implement all those hoopy > control abstractions in Ruby, you just have to use Procs rather > than blocks. You can pass an arbitrary number of Procs to a > method. Sure, but the syntax is awkward. That's the beauty of Smalltalk -- user defined control abstractions use the same syntactic style as the existing set of control structures. Programming then becomes a matter of defining and using domain specific languages built from the primitives provided by the Smalltalk environment. The same is true in Lisp, but Smalltalk's syntax is more readable, in my opinion. E.g. in Ruby a user defined control structure if-then-else block would look like this, which is more awkward than the built in if statement: if some_test proc do something end, else proc do something_else end While in Smalltalk it would be: some_test ifTrue: [ something. ] ifFalse: [ something_else. ]. Which is, in fact, the built in if statement, because all control structures in Smalltalk are defined in terms of the object model rather than being special syntax. Cheers, Nat.