Re: [whatwg] [canvas] Path object

On Tue, 9 Oct 2012, Anne van Kesteren wrote:
> On Tue, Oct 9, 2012 at 1:29 AM, Ian Hickson <ian@hixie.ch> wrote:
> > We could only change Path, since the others are already deployed. We 
> > could add new constructors, but that would just be new redundancy, and 
> > thus probably isn't worth it.
> 
> FWIW, I think adding new constructors to make things more convenient for 
> authors can definitely be worth it. E.g. I'm strongly considering adding 
> new Document() so you no longer need 
> document.implementation.createDocument(..., ..., ...). Similarly we 
> already added new Event() and friends to substantially improve the 
> custom events situation.

For new features I completely agree, but for old features we have to be 
really careful about not adding redundancy, IMHO. Events are used quite a 
lot and the new constructors did much more than just make the API 
consistent -- it also made it way simpler, to the point where what was 
three lines of code with dozens of ambiguous arguments is now a single 
line of very readable code. With the canvas objects it's not at all clear 
to me that we'd get the same win.

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

Received on Tuesday, 9 October 2012 18:43:47 UTC