From: Sam Griffith Date: 2002-11-06T14:04:23+09:00 Subject: Re: Thoughts on Ruby On 11/03/2002 1:43 PM, in article 20021103194255.BCTH27245.tomts19-srv.bellnexxia.net@hogwarts, "Austin Ziegler" wrote: > Further, the procedural version easily > allows chained boolean tests (e.g., if ... elsif ... elsif ... end) > that the Smalltalk version doesn't lend itself to. I'm not trying to flame, so please don't take this comment that way.... Having said that, the boolean chaining can be seen as the same as a 'case' statement and in OO development anytime you see a 'case' statement, you are staring at a possible design issue. On the other hand, in Smalltalk you would just do (if you wanted to chain): (a = 5) ifTrue: [code to execute] (a = 6) ifTrue: [code to execute] (a = 7) ifTrue: [code to execute] With no need to chain them, because you don't need the syntax. The syntax you have with the boolean chaining is exactly what I have above. I use one simple idea: receiver message args. I do it for everything in Smalltalk. That is the only basic idea. There are some other minor syntactical elements like self, super, [], and 3 or 4 others. But that is it. In other languages, you have this syntax: If (a = 5) { } else if (a = 6) { } else if (a = 7) { } Or the equivalent case statement. There is special syntax for different kinds of comparators as well. Simple - if (a = 9) { .....}, Complex - if (a = 10) { ... } else { ... }, etc. You don't need this if you maintain the idea of: receiver message args. You may like syntax and that is ok, but once you get used to Smalltalk and the receiver message args idea and that everything is read from left to right with the only override being parentheses, then it really is easy to read any code. I also wanted to point out that today's commercial Smalltalk systems are not intrinsically required to be image based anymore. They have file loads and most of your program can be file based. Development is done in an image to gain all the benefits that that approach provides. (That is another topic) Also, you do require a small starter image with the bootstrap classes in it, but after that, you can load everything. (Envy proves this point). And finally as someone else mentioned. Squeak, the open source Smalltalk being done by many people, but including some of the original designers including Alan Kay, is self describing including down to primitives. You write your primitive in a subset of Smalltalk and the environment generates your C code which you compile and then it gets runtime linked back into the environment. The subset of Smalltalk you write in basically only excludes Block closures from my understanding. So you grow the Smalltalk system by using it to create it's next version no matter what level of access you need. This is very much like the Lisp systems. I've spouted enough. I really like Ruby and plan on using it for years to come. I just wanted to drop a few thoughts. Have a great day! -- Sam Griffith Jr. email: staypufd@mac.com Web site: http://homepage.mac.com/staypufd/index.html