W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2012

Re: [whatwg] [canvas] Path object

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 9 Oct 2012 18:43:10 +0000 (UTC)
To: Anne van Kesteren <annevk@annevk.nl>
Message-ID: <Pine.LNX.4.64.1210091841210.1904@ps20323.dreamhostps.com>
Cc: WHATWG <whatwg@whatwg.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT