W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Why do we allow overloads on legacycallers?

From: Cameron McCormack <cam@mcc.id.au>
Date: Sat, 03 Aug 2013 10:36:37 +1000
Message-ID: <51FC5095.1040101@mcc.id.au>
To: Anne van Kesteren <annevk@annevk.nl>
CC: Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Anne van Kesteren wrote:
> So talking with others in e.g. TC39 it seems the general feeling is
> that we should have less overloading of the type that happens in
> <canvas>. Maybe we could somehow split this algorithm in various ways
> and have the really complicated stuff be legacy opt-in in some manner?
> (Sorry for making this so open-ended, I haven't had time to
> investigate myself.)

Yeah, the overloading that happens in <canvas> is particularly egregious.

I'd be open to restricting certain complicated overloading to legacy 
APIs, if we can find a useful point to do that.

There aren't actually many instances of overloading in the platform that 
can't be rewritten with optional arguments and union types, although I 
know that some specification writers like to use overloading because 
it's easier to read than cramming things in to a single operation with 
union types.  We should probably start by looking at all of the current 
uses of overloading.
Received on Saturday, 3 August 2013 00:37:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC