[whatwg] Canvas 2d methods

Ian Hickson ian at hixie.ch
Sun Jul 2 01:20:06 PDT 2006


On Sun, 2 Jul 2006, Stefan Gössner wrote:
> Ian Hickson wrote:
> > On Sat, 1 Jul 2006, Andrew Fedoniouk wrote:
> >  
> > > In prototype based languages it is almost impossible to implement 
> > > 'with' effectively in the given notation.
> > > 
> > > ctx.moveTo(0,0).lineTo(10,10);
> > > 
> > > is more effective. In some circumstances - in times.
> > 
> > Why is it more effective for JS?
>
> see 
> http://yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/

I'm familiar with this, but it doesn't seem to be relevant for this case 
since all the method names are predefined and well-known.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list