[FIX] BlockArgumentDescriptionFix ( do not accept )

Torge Husfeldt torge.husfeldt at gmx.de
Mon Sep 8 09:05:10 UTC 2003


Hi Mike(s),

> On Tue, Sep 02, 2003 at 07:56:13AM -0700, Mike Rutenberg wrote:
>>
>> Introduces an error, mistakenly reporting the number of arguments passed
>> rather than the number required.
>>
>> Test case:
>> [ :i | 1] valueWithArguments: #(1 2)
>
> Err yes, how clueless!  sorry about that.  I guess I got the wrong end of 
> the stick.  I always thought the error text for this was incorrect
>
> |c|
> c _ OrderedCollection new.
> c add: 'hello'.
> c do:[1 + 2]
>
> Because the error you get is "This block requires 0 arguments" and I 
> think, no it doesn't it needs 1.  This is one of the newbie things I do 
> all the time.  I think I now see that the intent of the error, had I read 
> the method comment correctly, is that the block you have given doesn't 
> expect any arguments.  I always read the error as you don't need any 
> arguments for the operation, and you do, you need 1 - but only do: knows 
> this.  So my intent was that it would tell you how many you needed for 
> the operation to work correctly - that's what I assumed it would mean.  
> But my assumption is wrong here, because only the block knows how many it 
> needs from how it has been written, not how many it is being passed.
>
> So sorry for making a mess of that.

I think the wording in the attachend cs illustrates the point.
It really is a question of your point of view.
i.e. is the block ok and somebody tried to invoke it
with a wrong number of arguments or is the operation
ok and the user supplied a wrong number of arguments.
On Tue, 2 Sep 2003 16:04:44 +0000, Mike Roberts <mike at mjr104.co.uk> wrote:

>
> Thanks for reviewing it anyway.
>
> The bugs in the related bug post aren't bugs then - so I'm afraid they're 
> going to need to be ignored as well.
>
> Sorry,
don't be, i find these kind of discussion really fruitful.
>
> Cheers
>
> Mike
>
>
Cheers,
Torge



-- 
Der Mensch kann wohl tun, was er will, aber er kann nicht wollen, was er 
will.
(Schopenhauer)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: New Changes.1.cs
Type: application/octet-stream
Size: 872 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030908/ecf054c6/NewChanges.1.obj


More information about the Squeak-dev mailing list