From: Nikolai Weibull Date: 2005-07-28T20:49:57+09:00 Subject: Re: Idea for Ruby 2.0 Brian Schr�der wrote: > On 28/07/05, Nikolai Weibull > wrote: > > I was thinking whether Ruby 2.0 should introduce I-don't-care-type > > variables, like Haskell or Prolog has. It would make all > > identifiers beginning with a lowline invalid, except in > > parameter-lists, which could mean too much incompatability with Ruby > > 1.x, but perhaps it's worth at least some thought?, > Why would it make all identifiers beginning with an underscore > invalid? One don't care variable should be enough for everybody I > think ;-). > > a, _, b, _, c = *function() > > would make sense to me, though > > a, _a, b, _b, c = *function() > > could continue to set five variables. Well, it depends on how you would want it. In Prolog (don't remember how Haskell does it), all variable beginning with a lowline are ignored - it adds some documentational value. Perhaps only _ is enough, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}