Re: Proposed ISSUE: Flatten algorithm identifiers

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:21:58 UTC