[FIX] BlockArgumentDescriptionFix ( do not accept )

Andreas Raab andreas.raab at gmx.de
Sun Sep 7 21:37:41 UTC 2003


I guess a key problem is that "this block requires" looks like an
expectation (contract) you have with the object and in the case of
invokation with the wrong number of arguments you really break two
independent contracts - one being that of "only invoke this block with N
arguments" and the other one being "this method expects a block with M
arguments". Typically the latter is the more important one - personally, I
find the current error message horribly confusing.

So how about simply telling the user "Wrong number of arguments" instead of
specifically trying to give one number or the other?

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Daniel Vainsencher
> Sent: Sunday, September 07, 2003 11:00 PM
> To: The general-purpose Squeak developers list
> Cc: The general-purpose Squeak developers list
> Subject: Re: [FIX] BlockArgumentDescriptionFix ( do not accept )
> 
> 
> I don't think you're the first to be confused this way - maybe you can
> think of wording improvements and be the last?
> 
> Daniel
> 
> Mike Roberts <mike at mjr104.co.uk> wrote:
> > 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.
> 



More information about the Squeak-dev mailing list