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

[whatwg] executeSql shouldn't have variable length arguments

From: Chris Prince <cprince@google.com>
Date: Fri, 5 Oct 2007 17:53:07 -0700
Message-ID: <cd580da00710051753s395351bcoc8fabdfaedf367ae@mail.gmail.com>
> Summary: variable length arguments seem cute at first, but end up
> being more pain that they are worth.

Indeed!

Another reason we moved away from varargs in Gears was because it made
some APIs impossible to extend later.  For example, this:
    method(v1_string_arg, v1_array_arg, v2_optional_arg)
would be impossible if "v1_array_arg" were a vararg (...) parameter.



On 10/5/07, Aaron Boodman <aa at google.com> wrote:
> Scott just pointed out to me that the current spec has executeSql
> taking a variable number of arguments:
>
> http://www.whatwg.org/specs/web-apps/current-work/#executesql
>
> We tried this in Gears at first, but learned quickly that it was a
> huge pain to work with. Dealing with the arguments collection in
> javascript is very painful, so we ended up just passing arrays around
> and converting them to the variable length at the last minute.
>
> Summary: variable length arguments seem cute at first, but end up
> being more pain that they are worth.
>
> - a
>
Received on Friday, 5 October 2007 17:53:07 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC