[Gc] C++ API enhancement proposal

MenTaLguY mental at rydia.net
Mon Oct 15 11:45:50 PDT 2007

On Mon, 15 Oct 2007 16:31:14 +1000, skaller <skaller at users.sourceforge.net> wrote:
> A pity sometimes you have to cope with bad interfaces,
> that is one valid reason for single objects .. still,
> you should always write your code to accept explicitly
> passed pointers even if there is currently no apparent
> reason.

Using explict arguments is much preferred (if nothing else
it grants you considerable benefits when testing), but
that's orthogonal to whether one decides to have a single,
unique instance of a particular sort of object, which may be
required by what you're modeling[1].
> As soon as you decide there's only one of something
> someone will find a use for two.

Perhaps you are thinking of the "zero-one-infinity" design
principle taught in CS classes?


[1] For instance, an object modeling "the operating system
the current process is executing under"

More information about the Gc mailing list