On 2/4/11, Jonathan M Davis <[email protected]> wrote: > On Thursday 03 February 2011 20:51:01 Andrej Mitrovic wrote: >> Ah, I've just realized we already have the @disable attribute. This is >> practically what I was looking for. > > That's more for doing stuff like disabling functions which the compiler > normally > takes care of if you don't - such as opAssign on arrays - but I suppose that > you > could use it for what you were looking for. Really though, I'd say that > correct > solution is usually to just comment out the code. > > - Jonathan M Davis >
I don't find that to be a good solution, unless I add another comment stating why the code was commented out. Otherwise, how am I to figure out why I commented some code out when I read it several weeks later? Is the code unfinished, faulty, a test case, ready to be removed, etc? Who knows.. You can take a look at Phobos for plenty of examples of commented out code, without any backup comments stating why they're commented out. Try figuring out why they're commented out if you haven't written that code yourself. You can only guess, or ask in the NG and hope someone remembers why.
