Greg Lindahl writes:

> On Thu, Sep 12, 2013 at 05:38:00PM +0100, Smylers wrote:
> 
> > How about Vehicle::Tesla::ModelS then?
> > 
> > Does putting Device:: in front of that lot actually add anything,
> > other than to the unwieldiness of the name?
> 
> Vehicle:: doesn't generalize very well to toasters, refrigerators,
> etc.

Does it have to? If modules for such household goods come along, how
much does it help users for those modules to share a namespace with
modules for vehicles?

(Note they can share implementation, or not, independently of whether
they share a namespace.)

> If a new top-level name is a good idea,

It isn't a good idea _per se_; it's only a good idea if none of the
existing ones seem to fit.

> I'd suggest an Internet-of-Things top-level, Thing:: or IoT:: or IOT::

Would somebody who has a Tesla car (or indeed a toaster) think of
searching for IOT?

Would somebody seeing IOT in a module name realize what it means? (I
don't think I would.)

“Thing” is such a generic word that I don't think prepending Thing::
adds any meaning at all. While you're using “thing” in quite a specific
way, almost anything could be thought of as a thing. I'd say Device:: is
more meaningful than Thing::.

> This particular module, btw, will probably be good for future Tesla
> vehicles; it's anyone's guess how the API will evolve.

In that case go with your instinct and name it ::Tesla. If other Tesla
APIs come into being (either for different cars or later versions for
the Model S) your module can always be extended to cope with those
somehow.

Smylers
-- 
Stop drug companies hiding negative research results.
Sign the AllTrials petition to get all clinical research results published.
Read more: http://www.alltrials.net/blog/the-alltrials-campaign/

Reply via email to