inline enum in function declaration

Boris Wang nano.kago at hotmail.com
Mon Jun 12 18:33:37 PDT 2006


It's a good feature, not only a solution for this problem.

"Andrei Khropov" <andkhropov at nospam_mtu-net.ru> 
??????:e6jveg$2g4o$1 at digitaldaemon.com...
> 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