[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Correct to ignore params to :around methods?
- To: firstname.lastname@example.org
- Subject: Re: Correct to ignore params to :around methods?
- From: kab (Kim Barrett)
- Date: Sat, 09 Jan 93 19:59:17
- Cc: email@example.com
> I use :around methods to bind special variables and then
> call call-next-method with no parameters.
> This works, but causes compiler warnings for each non-
> specialized parameter.
> I can get rid of the warnings by declaring to ignore
> the parameters, but I feel uncomfortable doing that since
> the parameters are in fact "used" by the method called
> by call-next-method. Ignoring them works, but would it
> work if my declaration were trusted?
> What is the correct way to handle this?
> Thanks for any assistance.
Declaring the variables "ignore" is correct, since you really aren't using
those parameters. You are instead "using" a conceptual hidden parameter
containing all of the values received by the method. This is one of those
cases where the distinction between argument values and parameter variables is
important and should not be conflated.