[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Yield & associations (was Proc / def /yield semantics

Mark Hubbart

9/27/2004 7:04:00 PM


On Sep 26, 2004, at 5:03 PM, Markus wrote:

> On Sun, 2004-09-26 at 15:11, Mark Hubbart wrote:
>> On Sep 26, 2004, at 11:54 AM, Markus wrote:
>>
>>> Perhaps. I keep feeling that there is an "Ah ha!" lurking in
>>> here somewhere--if we just look at things on the right way, we could
>>> (for 2.0) get nearly full backward compatibility, cleaner semantics,
>>> and nice route for expanded expressiveness. I'll post more if the
>>> idea still seems reasonable after I think on it for a day or so...
>>
>> If Association is a subclass of Array or Values, then it should be
>> possible to splat it. Here's an extremely bare-bones version
>> demonstrating the possible behavior:
>
> This looks to be very much along the lines I have been thinking,
> except that I am totally ignorant of the class Values. Can you give me
> a little background?

IIRC, Values is the encapsulation class for parameter lists and
multiple assignment lists. I could easily be wrong, but I think that in
the future when you use the splat operator to collect items, you will
end up getting a Values object, not an Array. I think.

cheers,
Mark
>
> -- Markus