Re: [sensors] Don't allocate response objects to avoid triggering GC

> Why not just keep the existing semantics (sensor.reading property) 
and say that it always returns the same object instead of re-creating 
it every round?

Because it doesn't help us with requirements 2) and 3) above, makes 
for more verbose code (`sensor.reading.x` instead of `sensor.x`), and 
makes mutable an object developers will/should think of as immutable.

-- 
GitHub Notification of comment by tobie
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/153#issuecomment-265388881 using
 your GitHub account

Received on Wednesday, 7 December 2016 08:42:20 UTC