Whither SmallScript? (was Re: Integer micro-benchmarks)
Bjorn Pettersen
BPettersen at NAREX.com
Fri Apr 27 14:41:30 EDT 2001
> From: Steven D. Majewski [mailto:sdm7g at Virginia.EDU]
> On Fri, 27 Apr 2001, Andrew Hunt wrote:
>
> > I personally like the style and dynacism of Ruby. For
> instance, to declare
> > a class that inherits from another class you simply have:
> >
> > class Foo < Bar
> > def myMethod
> > File.new ("test.dat", "w") { |f|
> > f.puts "Hello world!"
> > }
> > end
> > end
>
> What do the vertical bars around the f ("|f|") above indicate ?
>
> ( Maybe it's those extra non alphanumeric operator looking chars
> that make folks think of Perl -- even if they are used differently,
> to someone that doesn't read Ruby, it looks like more "line noise".)
It defines a local variable of the enclosing anonymous block (hi Alex :-)
It's similar to how SmallTalk defines variables, which I presume would
explain why they like it (?)
-- bjorn
More information about the Python-list
mailing list