What do you think about Ruby ?
C G
catgame at gmail.com
Tue Aug 9 01:18:46 UTC 2005
On 8/7/05, Blake <blake at kingdomrpg.com> wrote:
> 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>
This particular feature was introduced into the
PL arena by SETL I suppose?
Nowadays it is everywhere, nearly all functional
languages have it. Python has it too.
For languages which have decent support for
macros, Lisp & Scheme on one hand, and
camlp4 on the other hand, this is really a
small thing.
Conceptually, every mathematician knows it and
uses it.
I can't say this tells much about the strength of
Smalltalk or Squeak, or Ruby.
c.
More information about the Squeak-dev
mailing list
|