inline enum in function declaration
Andrei Khropov
andkhropov at nospam_mtu-net.ru
Mon Jun 12 07:58:31 PDT 2006
Deewiant wrote:
> Lionello Lunesu wrote:
> > I'm cutting back on the use of "bool" as a function parameter, since the
> > words "true" and "false" are rarely applicable to the respective
> > parameter, for example:
> >
> > #void Invalidate( bool redraw );
> >
> > This declaration seems ok, but when reading the code:
> >
> > #Invalidate(true);
> >
> > you have no idea what that "true" is referring to. I guess everybody
> > knows what I'm talking about with "cutting back on the bool".
> >
> > Obviously "enum" is the right replacement:
>
> I'd prefer just being able to pass the names of function parameters when
> calling:
Yeah, I like the idea too. It's possible in Python.
--
AKhropov
More information about the Digitalmars-d
mailing list