Eric Mahurin wrote:
There is no reason Ruby couldn't optimize for the case where a
variable is declared in the argument list and never used.
Nor for it to not issue a warning if the variable is declared in the
parameter list but never used,
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);}
Nikolai Weibull <mailing-lists.ruby-talk@rawuncut.elitemail.org> writes:
Eric Mahurin wrote:
There is no reason Ruby couldn't optimize for the case where a
variable is declared in the argument list and never used.
Nor for it to not issue a warning if the variable is declared in the
parameter list but never used,
nikolai
This should not happen anyway. There are enough good reasons
to ignore some parameters (cf. Integer#times).
···
Nikolai Weibull
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
Christian Neukirchen wrote:
Nikolai Weibull <mailing-lists.ruby-talk@rawuncut.elitemail.org> writes:
> Eric Mahurin wrote:
> > There is no reason Ruby couldn't optimize for the case where a
> > variable is declared in the argument list and never used.
> Nor for it to not issue a warning if the variable is declared in the
> parameter list but never used,
This should not happen anyway. There are enough good reasons to
ignore some parameters (cf. Integer#times).
That's precisely why you would want to have unnamed variables,
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);}
Nikolai Weibull <mailing-lists.ruby-talk@rawuncut.elitemail.org> writes:
Christian Neukirchen wrote:
Nikolai Weibull <mailing-lists.ruby-talk@rawuncut.elitemail.org> writes:
> Eric Mahurin wrote:
> > There is no reason Ruby couldn't optimize for the case where a
> > variable is declared in the argument list and never used.
> Nor for it to not issue a warning if the variable is declared in the
> parameter list but never used,
This should not happen anyway. There are enough good reasons to
ignore some parameters (cf. Integer#times).
That's precisely why you would want to have unnamed variables,
nikolai
Don't make me write 5.times { |_| foo }, *please*.
···
Nikolai Weibull
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org