[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:6449] Re: Did Ruby take the _right_ features from Smalltalk?

From: Dave Thomas <Dave@...>
Date: 2000-11-20 01:36:53 UTC
List: ruby-talk #6449
parse@my.sig.net writes:

> But something struck me as odd.  One of the nicest things about 
> Smalltalk is that statements read like ordinary imperatival 
> sentences in English.  Instead of writing
> 
> 	object.doFoo(otherObject, thirdObject)
> 
> you can write
> 
> 	object doFooWith: otherObject andWith: thirdObject
> 
> using prepositions and not simply named parameters.

I believe that keyword parameters are due in a coming release of
Ruby. That'll give you most of the Smalltalk-like syntax, omitting only 
the pattern matching overload.

> The authors praise Ruby for having dropped this "non-standard" 
> syntax.

Actually, it wasn't really that part of Smalltalk we were talking
about. If was more things such as 1 + 2 * 3 => 9, and the sometimes
difficult to read ifTrue: stuff. (Although I personally find a[1]
clearer than a at: 1, but that's just what I'm used to).

> What Ruby does share with Smalltalk is the use of blocks.  I might 
> grow to like blocks, and I'm not denying it's a powerful feature.  
> But it is not a feature that lends itself to readable code.  I find 
> it much easier to quickly get my head around a Python statement like
> 
> 	for each item in myCollection

Of course in Ruby you can have the best of both worlds:

   myColleaction.each { ...}

or

   for item in myCollection
     ...
   end


> But maybe in six months I'll come round.

I'm betting 6 days ;-)


Dave

In This Thread