On 2011-03-09, at 13:20, Shanjian Li wrote: >> It doesn't specify how to print objects, except for %s, which says that if >> the argument is not >> a string, convert it to string using .toString(). >> > > If the format specifier does not apply to the argument given, it should > raise exceptions. Except string conversion, no other conversion will be > done.
Disagree. Since ECMAScript knows the type of the arguments, it does _not_ need the format specifier to tell it the type (as C does). Apparent mismatches should be left open as extensions. For example, the `x` formatter should simply specify that numeric values should be expressed in base 16, not that the value _must_ be a number. That way, you could pass an Array of numbers to `x` and see the numbers in base 16. _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss