Re: Handling too few arguments in method calls

There's also overloaded functions like (for example)  
CanvasRenderingContext2d.drawImage
void drawImage(in HTMLImageElement image, in float dx, in float dy,  
[Optional] in float dw, in float dh)
if I do drawImage(image, x, y, foo) is this under-provision for  
drawImage(image,x,y,foo,undefined) or over provision for  
drawImage(image,x,y) or is it an error?

Do we need an annotation to say something like
void drawImage(in HTMLImageElement image, in float dx, in float dy,  
[Optional 2] in float dw, in float dh)
(or something) that would say the next 2 arguments are optional, but  
both must be provided?

--Oliver

On Jun 25, 2009, at 10:58 AM, Darin Adler wrote:

> What about too many arguments, and ignoring extra ones? Is that  
> settled?
>
>    -- Darin
>
>

Received on Thursday, 25 June 2009 18:29:40 UTC