Question: interrogating a method's arguments
Brent Pinkney
pinkney_b at aircom.co.za
Tue May 20 05:18:43 UTC 2003
>Complementing Bob's answer to your actual question - what is the problem
>you're trying to solve? using reflective facitilies to solve
>non-reflective domain problems is often not the best solution (though it
>might be a useful stopgap hack).
I have a method which accepts 5 or so numeric arguments. I need to make the sign (+/-) of each argument match the sign of the first non-zero argument.
Sure, I can beat the problem to death with a stick, but I prefer to elegantly decapitate it with a scimitar.
I am just amazed that no-one has ever needed to interrogate the arguments as an Array, especially when we have the complimentary method:
#perform: aSelector withArgs: anArray
It feels like an oversight.
Does anyone else think ContextPart>>#arguments should make it into 3.6 ?
More information about the Squeak-dev
mailing list
|