Re: [sigc] Renaming nil



> Martin,
>
> Thanks for your reply.
>
>> 1) I think for the 2.0 branch the rename should be done conditionally.
>> 2) 'none' is fine and probably closer to the actual meaning of the
>> definition than 'empty'.
>
> Will do both. What should I do for the inline documentation though? It
> refers to 'nil' in many places. Should I just replace all occurences of
> 'nil' in the doc with 'nil (none if using an Objective-C compiler)'? Or
> should I just ditch any reference to 'nil' in the doc? After all, no
> client of the library should explicitly refer to 'nil', so why document
> it?
>
>> 3) I don't know any reason why it should not be binary compatible.
>
> Me neither. Ater closer inspection of the code, it seems that:
>
> o The sigc::nil type is completely opaque (it is declared but not
> defined).
>
> o It is just used as a placeholder for the compiler to be happy and have
> a constant number of arguments in templates.
>
> o Other than that, there are no references to it (in particular nobody
> ever compare types using sigc::nil).
>
> Thanks,
> --
> hpreg

Hm, the cleanest solution would obviously be to write 'nil (none if using
an Objective-C compiler)' in the documentation. We cannot neglect it in
the documentation, because doxygen automatically inserts it from the
template definitions. Therefore we have to explain it to the user.

Probably it would make things easier to rename it to 'none'
unconditionally but add a typedef for 'nil' for any but the Objective-C
compiler. This way should also garuantee that code and binaries stay 100%
compatible so I would be absolutely fine with this solution. Since you are
doing the actual work I leave the choice with you ...

Regard,

  Martin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]