From: Albert Wagner Date: 2002-11-04T06:22:35+09:00 Subject: Re: Thoughts on Ruby On Sunday 03 November 2002 2:34 pm, Austin Ziegler wrote: > On Mon, 4 Nov 2002 05:14:59 +0900, Albert Wagner wrote: > > On Sunday 03 November 2002 1:43 pm, Austin Ziegler wrote: > > > > > >> ...too many symbols... > >> ... it doesn't read naturally... > >> ... It looks odd... > >> ...harder to read... > >> ...it doesn't seem as natural... > > > > > I would appreciate it if you don't necessarily cut the context from > my statements, because they're quite specific. I apologize if my notation offended. I thought that "" and "..." before and after were adequate to indicate that the phrases were "out of context" and therefore anyone curious about the context would read your post. > To pull something > random from Seaside: > > !IAPage methodsFor: 'accessing' stamp: 'AB 2/17/2002 20:46'! This is a snippet from a marshalled file of Smalltalk code, not actually from a Smalltalk image. The "!" here is not actually part of Smalltalk syntax proper but is used as a delimiter in a marshalled statement telling the marshaller where to file in the following method. > withAllChildrenDo: aBlock > aBlock value: self. > children ifNotNil: [children do: [:c | c withAllChildrenDo: > aBlock]]! ! > > As I said before, I don't "get" Smalltalk. However, what I can see > here is that there's four different symbols (!, :, |, []), and at > least one of them does double-duty (:). It's not very clear at all > -- in a reading sense -- what this does. I suspect that the > equivalent Ruby is more readable, not least because it uses fewer > symbols. No exact equivalence in Ruby: def recurseTree(&blk) aBlock = self # pseudocode children.each do {|c| c recurseTree(aBlock)} end Hmmm...I see five different symbols here, and one of them does double duty (|) Maybe you can write a recursive tree walking method in Ruby with fewer lines of code and fewer symbols. I didn't really try hard and I cheated with "aBlock = self". (Note: we may actually be in violent agreement here, given > your comments regarding "images", but I'm not sure.) > > Also, my comments on RPN (and thus Forth and, at least to some > degree, Smalltalk) are simply empirical in nature. We don't > generally teach people 3 3 + when we're teaching math. RPN is not used in Smalltalk syntax. Smalltalk: x := 3 + 3 Ruby: x = 3 + 3 > It doesn't > follow most human languages in order -- it's SOV ("three and three > add") where as most human languages are SVO ("three add three") or > VSO ("add three and three"). It requires a different sort of logic > to read SOV-ordered concepts. Agreed. I don't like it either. > > When you add these two items together, then it's not a leap to > suggest that Smalltalk is harder to read and it doesn't seem as > natural as a "conventional" language. This doesn't mean that > Smalltalk is better or worse, but just *harder* to read. ANY language that you do NOT know is harder to read than one you DO know. So what's your point? > > -austin > -- Austin Ziegler, austin@halostatue.ca on 2002.11.03 at 15.19.34 -- "I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." -Alan Kay