From: Nikolai Weibull Date: 2006-10-15T21:55:33+09:00 Subject: Re: What about 'splay'? On 10/15/06, dblack@wobblini.net wrote: > Hi -- > > On Sun, 15 Oct 2006, Nikolai Weibull wrote: > > > On 10/11/06, Nikolai Weibull wrote: > > > >> On 10/11/06, dblack@wobblini.net wrote: > > > >> > With regard to the splat/unarray/values discussion: > > > >> Why not #destructure[?] > > > > Did this mail get through? I thought #destructure was a rather good > > suggestion. Am I missing something? > > There's still the problem (which affects 'unarray' too) that the > method itself is going to return an array, which means it should > really be called "to_array_that_star_will_operate_on", or something > like that. The method itself doesn't destructure the structure. I realize that, but you're destructuring whatever data you have into an array of values which will then be fed to *. Still, there's a bit of a gap there... > In the end, I don't think the idea of a separate, named > array-conversion method just for * really fits in with either the way > Ruby handles conversion methods, or the way Ruby handles unary > operator definitions. To me, that's a sign that it's probably not a > good fit at all, and it probably be better to use to_a[ry] or @*. I agree. Having three methods that turns the receiving object into an array is confusing and is such an easy target for "So if Ruby's so great, why does it have three methods for turning an object into an array, eh?"-type discussions, which we are obviously not ready to tackle. Still, I guess what's really important is that there is /a/ way to do this, whatever it be named. nikolai