Re: [mediacapture-main] WebIDL types needed in Constrainable application

Ugh. A dictionary guarantees non-recurrence of members, whereas an 
array does not. A dictionary test is a hash lookup, whereas an array 
is linear lookup. I think:

    if (getSupportedConstraints().name)

is better semantically, syntactically and performance wise. Those who 
wish to do array math can always do:

    if (Object.keys(getSupportedConstraints()).indexOf("name") != -1)


-- 
GitHub Notif of comment by jan-ivar
See 
https://github.com/w3c/mediacapture-main/issues/116#issuecomment-78070983

Received on Tuesday, 10 March 2015 14:57:32 UTC