Re: no longer treating explicit undefined as a missing, optional argument

On Wed, 04 Jan 2012 02:50:43 +0100, Cameron McCormack <cam@mcc.id.au>  
wrote:
> Anne van Kesteren:
>> Where are [TreatUndefinedAs=Null] and [TreatUndefined=EmptyString] used?
>
> I don't recall if they are being used currently.  If they aren't, we  
> should remove them.

Not used in XHR, DOM, or HTML. Cannot think of anything else either.


>> Also, how do I keep the IDL readable? I guess I could define a special
>> type.
>>
>> typedef LegacyString = [TreatUndefinedAs=Missing] DOMString?;
>>
>> Though that is still not really nice.
>
> Banging these things into the IDL rather than being in the prose often  
> comes at the price of being less readable.  I don't think
>
>    void open(DOMString method, DOMString url, optional boolean async,
>              [TreatUndefinedAs=Missing] optional DOMString? user,
>              [TreatUndefinedAs=Missing] optional DOMString? password);
>
> is completely unreadable.  You may like to format the extended  
> attributes in your IDL fragments differently, so that they stand out  
> less.  (I've never been a fan of the "only black text on silver  
> background" IDL fragment formatting in specs.)

I was hoping to avoid newlines, but I guess I can make an exception for  
this one method in the platform. It is quite long, after all. Given the  
current markup we have for <pre class=idl>, do you have suggestions for  
styles? I'm willing to try them out to see if they are better.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 4 January 2012 09:46:52 UTC