On Sun, 27 Nov 2005, Hans-Christoph Steiner wrote:
subclass:instanceVariableNames:classVariableNames:poolDictionaries:
Its usually done like this to make things clearer: Object subclass: #MessagePublisher instanceVariableNames: '' classVariableNames: '' poolDictionaries: ''
Well, in Smalltalk, it's required to insert an argument after each column. And then, spacing things out doesn't make things clearer, they make them more spaced out, period. The message selector is still a 67-character symbol. It's worse than German words! (well, *most* German words, I mean)
while in Ruby it's done by sending this message to the Class class: new
That's a pretty weak argument if you pull it a little snippet of code totally out of context.
Ok, I'll give away the context now. The context is that this is one of the most important message selectors in the Smalltalk language. It's not just a little snippet of code, it's one that appears in nearly every Smalltalk source file.
And yes, that's about the worst case in the Smalltalk language. But it's not unfair, because it's also a very common case, so common that every Smalltalk programmer sees it on his/her first day.
How about a page of code side by side?
If you want to compare Ruby and Smalltalk, you may pick a page of each for the sake of your argument.
Writing gibberish just to fill out space would be stupid in any language. And it seems that redundancy works quite well in written language, look at all these big words repeated again and again, it could be much shorter if I just abbreviated everything. But would it be more readable?
As I said, each word is already an abbreviation of its definition.
Now, comparing lengths of words to each other: people invent long words for occasional concepts, and short words for very recurrent concepts. For example, the word "ich" is a lot shorter than the word "Generalstaatsverordnetenversammlungen", and that's not a coïncidence. You aren't going to make people verbosify their daily speech using the argument that "ich" is an abbreviation and so it is an evil word.
Normal daily speech is a natural occurrence of Huffman compression.
Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju Freelance Digital Arts Engineer, Montréal QC Canada