W3C home > Mailing lists > Public > public-device-apis@w3.org > May 2010

Re: Property names vs. interface names

From: Robin Berjon <robin@robineko.com>
Date: Mon, 17 May 2010 09:25:16 +0200
Cc: public-device-apis@w3.org, Innovimax SARL <innovimax@gmail.com>
Message-Id: <E9B456A7-365B-4D49-B9DD-7123EA4B5343@robineko.com>
To: Max Froumentin <maxfro@opera.com>
On May 10, 2010, at 15:38 , Max Froumentin wrote:
> So let me ask at large, and summarise the issue.
> SysInfo deals with Properties (CPU, PowerSource, InputDevice)
> which are named in function calls, e.g. get("CPU", callback).
> The callback then receive an object that represent that property,
> defined by an interface, e,g,
> interface CPU {
>  float load
> }
> Using the same name for the property and its interface is confusing (for reasons explained in this thread). So what's a good way of naming them?

I am not convinced that it's confusing :) Most (in fact all I guess) the interfaces defined in this specification are not intended to be exposed to authors (or did I miss something?). Authors ought to only see the property name. The type name might show up in debugging, but I don't think that that'll be confusing.

This leaves open the possibility that it will be confusing to implementers. I'm not certain that that's such a big risk, is it?

Robin Berjon
  robineko  hired gun, higher standards
Received on Monday, 17 May 2010 10:31:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:19 UTC