A programming question!
-
PIEBALDconsult wrote:
But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it.
OMG. No. Is there ever any code you don't intend to rework? Over time my code would evolve into endless warnings every time I compiled it. Until I turn it off, making it completely pointless.
Sure, yet some are worse than others, or at least some times I know what I want to do when I have the time.
-
(I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider:
ObsoleteAttribute -- Marks the program elements that are no longer in use.
What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing aNotImplementedException
, because the code exists and works (mostly). Not atodo
either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. AnObsoleteAttribute
will do this -- but I expect that it would be confusing to my colleagues. Even aUseAtYourOwnRiskAttribute
would be better.I use
#warning
directives in my C# for this. Their messages show in every compile including product builds, so I can't forget things that need to be reviewed. It's nagging without being obstructive.Software Zen:
delete this;
-
I use
#warning
directives in my C# for this. Their messages show in every compile including product builds, so I can't forget things that need to be reviewed. It's nagging without being obstructive.Software Zen:
delete this;
Even when referencing something in a DLL?
-
Even when referencing something in a DLL?
For developing at my desk, the warning message is only issued when compiling the DLL, obviously. Our automated build process builds all parts of the product from source which causes the warnings to be in the build log. Both results are sufficient to help me keep track of items for later changes. The exceptions to both of these cases are third-party libraries supplied without source code. We use several of those to control hardware we buy off-the-shelf.
Software Zen:
delete this;