Re: Proposed ISSUE: Flatten algorithm identifiers

Great, thanks!


On Mar 18, 2013, at 7:24 PM, Ryan Sleevi <sleevi@google.com> wrote:

> Yeah, I agree that this is largely an issue with WebIDL - eg: just
> because WebIDL isn't expressive enough doesn't mean we should hold
> things back.
> 
> The next ED will attempt to resolve this - although expect a few bugs
> with language to creep in.
> 
> On Mon, Mar 18, 2013 at 4:21 PM, Mark Watson <watsonm@netflix.com> wrote:
>> 
>> On Mar 18, 2013, at 4:14 PM, Richard Barnes wrote:
>> 
>>> (Brought this up earlier, but I don't think it made it into the tracker...)
>>> 
>>> The current spec requires that algorithm parameters be encapsulated in a "params" field within an algorithm identifier.  For example:
>>> OLD: { name: "AES-GCM", params: { iv: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], tlen: 128 } }
>>> NEW: { name: "AES-GCM", iv: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], tlen: 128 }
>>> 
>>> The only reason this extra complexity would be necessary is if we expected an algorithm to need a parameter called "name".  This does not seem very likely; I see no problem making "name" a reserved word for the purpose of algorithm parameters.
>>> 
>>> This requires the useless interface "dictionary AlgorithmParameters {};" from which individual algorithms specialize.  Proposed revisions to WebIDL:
>>> -- Remove the AlgorithmParameters definition
>>> -- Remove the "AlgorithmParameters params;" from the Algorithm interface
>>> -- Change all descendants of AlgorithmParameters to instead inherit from Algorithm
>>> 
>>> Whatever the opposite of "syntactic sugar" is, this is it.  "Syntactic vinegar"?
>> 
>> "Syntactic arsenic".
>> 
>> i.e. I agree.
>> 
>> …Mark
>> 
>>> 
>>> --Richard
>>> 
>> 
>> 

Received on Monday, 18 March 2013 23:26:46 UTC