W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: [websockets] Binary support changes

From: Cameron McCormack <cam@mcc.id.au>
Date: Sat, 28 May 2011 11:11:59 +1200
To: Ian Hickson <ian@hixie.ch>
Cc: Adrian Bateman <adrianba@microsoft.com>, "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
Message-ID: <20110527231158.GB25892@wok.mcc.id.au>
Ian Hickson:
> Consistency is good when it makes sense. However, I don't think XHR is a 
> good parallel here. XHR has all kinds of additional complexities, for 
> example it lets you get a string, whereas here string vs binary is handled 
> at the protocol level and so can't ever be confused.
> However, if we want consistency here anyway, then I'd suggest we change 
> XHR to use the actual type values just like WebSockets. It would IMHO lead 
> to much cleaner code.

The difference would just be specifying `"ArrayBuffer"` vs
`ArrayBuffer`, right?  I think the difference in cleanliness is minimal.
Using strings as enumeration values is quite common in JS, but I don’t
think I’ve seen this idiom of using interface objects before.

Cameron McCormack ≝ http://mcc.id.au/
Received on Friday, 27 May 2011 23:12:29 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:32 UTC