[squeak-dev] String >> #numArgs

tim Rowledge tim at rowledge.org
Sun Dec 15 18:55:20 UTC 2019



> On 2019-12-15, at 3:24 AM, Tobias Pape <Das.Linux at gmx.de> wrote:
> 
> 
>> On 14.12.2019, at 21:11, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
>> 
>> 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?
> 
> There is none.
> Symbols are not code.
> 
> I see no point beyond apparent convenience to unify them further....

+1. A Symbol simply isn't nice to use that way. This isn't Lisp, y'know.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: PRM: PRint Money




More information about the Squeak-dev mailing list