- From: Rick Waldron via GitHub <sysbot+gh@w3.org>
- Date: Mon, 31 Oct 2016 21:40:24 +0000
- To: public-device-apis-log@w3.org
> > Spec says that Sensor.reading points to current reading. Reading is an object, therefore if I write let cached = Sensor.reading; by default JS engines will make reference, as a web developer I might think that cached is pointing to current reading. > > That's a good point in terms of meeting developer expectations. @rwaldron, WDYT? I think the language shouldn't use the word "current", for two reasons: 1. Since we're in the realm of discussing electrical things, the word "current" is already reserved for the thing measured in terms of amps. Is "current reading" a measurement of a sensor's current consumption, or the most recent measurement of some readable thing? 2. As @alexshalamov has identified, "current reading" doesn't make sense if the sensor is presently stopped; "last reading", "latest reading", "most recent reading"... these might be better for spec language. W/r to `sensor.read/start()`: `sensor.read()` would have its own baggage, specifically that devs might expect it to return a value, which it wouldn't (and definitely shouldn't). -- GitHub Notification of comment by rwaldron Please view or discuss this issue at https://github.com/w3c/ambient-light/issues/15#issuecomment-257428657 using your GitHub account
Received on Monday, 31 October 2016 21:40:30 UTC