Boost logo

Boost :

From: Geurt Vos (G.Vos_at_[hidden])
Date: 2001-12-17 10:28:42


> > >
> > > struct missing; // missing argument in a variadic function
> > >
> >
> > ...I usually don't like it when something is missing...
> >
> > IOW, the argument is IMO not missing, it's simply not
> > used, hence I'd say call the thing 'unused' instead...
>
> An example of an unused argument:
>
> void f(int)
> {
> }
>

This is unused from an implementation point of view.
What is unused from an interface point of view?

> An example of a missing argument:
>
> f();
>

Hmm, as I see it, missing implies something
was there in the first place. Missing implies
incomplete.

If f(); is an example of a missing argument, I'd
expect a compile error (missing argument: 1
expected, 0 found).

When calling f() with no arguments, the argument
isn't missing, it's simply not there - it doesn't exist.

There could of course be a default argument:

    void f(T i = missing);

vs.

    void f(T i = unused);

Now which one would raise more questions?

Geurt


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