Re: Representing a "dictionary or not present" member in a dictionary return value

On 3/5/14 5:37 PM, Travis Leithead wrote:
> Is there any context for this issue? E.g., has any spec run-up against this problem?

This came up in the context of designing a face-detection API in 
<>.  The return value 
is a dictionary that uses other dictionaries to represent detected 
facial features (eyes, mouth, etc).  When a facial feature is not 
detected, it seems to make more sense to have .eyes be null or undefined 
than to have it be an object with NaN values for the coordinates of the 
eyes (or some other sentinels like undefined)...

> (The first one that came to mind--and I don't know if it is impacted by this or not--is the Media Capture and Streams spec with its rather complex "Constraints" dictionaries...

Those are largely input, not output, so not really affected by this 


Received on Thursday, 6 March 2014 15:23:22 UTC