What do you think about Ruby ?
Blake
blake at kingdomrpg.com
Sun Aug 7 14:03:16 UTC 2005
On Sun, 07 Aug 2005 06:31:01 -0700, Jim Menard <jimm at io.com> wrote:
>> syntax. In other words, the "foreign" construct of:
>> 1 to: 4 do: [:i | Transcript show:i].
>> in Smalltalk is replcaed by:
>> i = 0
>> begin
>> puts "#{i}"
>> i += 1
>> end until i > 4
>
> What? In Ruby, I'd write either
>
> 4.times { | i | puts(i+i) }
>
> or perhaps, using the Range class,
>
> (1..4).each { | i | puts i }
Probably because you're a Smalltalker, too.<s> Or perhaps Ruby is becoming
more like Smalltalk. But I distinctly recall reading Ruby's creator(s?)
discussing this. It's in their book (available online at ruby-lang.org):
"Take a true object-oriented language, such as Smalltalk. Drop the
unfamiliar syntax and move to more conventional, file-based source code.
Now add in a good measure of the flexibility and convenience of languages
such as Python and Perl."
> Less so every major release.
Well, while I like Perl, I really wouldn't want to see it infect a bunch
of other languages.<s>
> Yes, Ruby isn't image based. That's one reason I like it: I can use
> Emacs.
I have very mixed feelings about the whole file/image thing. I think what
I'd like to see is a more transparent image. So that I could write an
object--I wouldn't use Emacs (or vi, don't shoot me)--but I would like to
have all the source stored traditionally in files, with images being
created from those, and you could move back and forth between them easily.
More information about the Squeak-dev
mailing list
|