[squeak-dev] String >> #numArgs

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Dec 14 20:11:40 UTC 2019


Hi all!


Consider the following:


foo := [:a :b | a raisedTo: b].
bar := #raisedTo:.

foo value: 2 value: 3. "5"
bar value: 2 value: 3. "5"

foo numArgs. "2"
bar numArgs. "1"


How can I overcome this inconsistency?

In situations where a symbol acts as "evaluable", quaking like a block, it is confusing to get these different results

Does there already exist a unified protocol? Or am I doing something wrong in general when I need this?


Best,

Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191214/e3682393/attachment.html>


More information about the Squeak-dev mailing list