Boost logo

Boost :

From: Kevlin Henney (Kevlin.Henney_at_[hidden])
Date: 2000-01-13 04:22:13


Ed Brey writes:
>> A matter of perspective: in line with the definition I've seen in
practice,
>> a dispenser is something to which items can be both added and removed.
As
>> an example, earlier I was unable to get a drink because the drinks
>> dispenser was being refilled!
>
>This is a good example of why "dispenser" has a connotation of removing.
>Many dispensers are devices from which normal people like us tend to only
do
>removing, but the insertion is typically only done by the mythical "they".
>e.g. "Drat! They haven't refilled the Coke dispenser yet."

I'm not sure the agency of the inserter is as relevant here, but I will
confess the selection of a couple of choice words at "they" earlier on :->

Having seen the subtlety and invention of the other names used, dispenser
unfortunately still seems at least as clear :-(

Preferring the standard to the offbeat is often good advice; if we want the
name to reflect the capability then we must compromise:

   * The name should capture all or some of the following properties:
   insertion, removal, encapsulation of an ordering policy. Dispenser has
   two out of three, as do the other suggested names -- all of the pouches,
   satchels, etc I have ever used support only non-deterministic ordering,
   and I would rather my code did not have this property :->

   * Where conventional terms exist they might be preferred, even if they
   do not have all the right connotations. For instance, in the standard we
   have allocators; they are also deallocators, even though the term does
   not have these connotations.

   * Inventing terminology for its own sake is a _bad thing_. I think
   pouches and satchels are cute and novel, but cuteness and novelty are
   perhaps not the best criteria by which to judge a spec. If terminlogy
   invention is being done, perhaps more neutral names such as Holder,
   Receptacle and Carrier.

   * Perhaps an adjective rather than a noun would be better. Rather than
   describing it as a thing, describe its properties.

Makes you kind of wish that the STL had chosen a term: regardless of its
merits, it would now be standard!

Kevlin


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk