Feature #4566
closed
Examples for NDN_CXX_DEPRECATED
Added by Junxiao Shi over 6 years ago.
Updated over 6 years ago.
Description
NDN_CXX_DEPRECATED
macro was introduced in Oct 2017 but it isn’t used in ndn-cxx codebase and doesn’t have any examples. It is difficult for developers to figure out how to use it correctly.
This issue is to add examples on how to use this macro for deprecating a type, a variable, and a function.
The examples shall appear in Doxygen, and in unit tests to ensure they are correct.
- Status changed from New to Code review
- Assignee set to Junxiao Shi
- % Done changed from 0 to 100
I'm not sure if this is worthwhile...
This IS worthwhile. The codebase should not leave any developer confused. Having documentation is always better than not having them.
In fact, I would not use the macro until this documentation is in place, and therefore this blocks #4526.
we will soon be able to require C++14, at that point we can drop the macro altogether and use the standard attribute [[deprecated]]
directly (which can be used in more situations)
This is irrelevant to the need of having documentation NOW. Dropping the macro removes the documentation and tests, of course.
Junxiao Shi wrote:
This is irrelevant to the need of having documentation NOW. Dropping the macro removes the documentation and tests, of course.
On the contrary, it is very relevant. There really is no point in documenting something that we know will be removed in a month or two. Moreover, not documenting it reduces that chances that other projects will start using it, and then break when we remove it.
and don't add ridiculous blockers please...
In this case, I will not work on any commit that rely on this macro. They will be blocked until this macro is removed.
Note that I haven't -1'd the change. I still think it's pointless and I'm not changing my mind, but I don't care if someone else wants to merge it.
- Status changed from Code review to Closed
- Start date deleted (
04/01/2018)
Also available in: Atom
PDF