On Sunday 16 January 2011 09:46:57 Andrei Alexandrescu wrote: > One possibility would be to have the legacy functions taking a d_time > simply take a long for now (d_time was an alias for it I recall). Then > you don't need to import std.date, and the warnings are gone.
I can do that. The problem is that then you don't get any messages when you use those functions, so when they get deprecated, it comes out of nowhere for you unless you've read the documentation or you've been using other d_time stuff and remembered that those functions take d_time. One suggestion that someone sent me was to temporarily templatize the function so that the pragma could be put inside the function as was done in some of the std.algorithm functions, but that _is_ a bit of a hack. I may have to do it that way though. As I mentioned before, what we really need is a version of deprecated that is used to indicate that something is scheduled for deprecation rather than actually deprecated. And, of course - as I believe you've suggested in the past - being able to give deprecated the deprecation message would be a definite improvement as well. As it is, we need the pragma both when the symbol is scheduled to be deprcecated and after it's been deprecated (in addition to having actually marked it as deprecated), or the programmer doesn't know what to use instead, and the pragma isn't precise enough to avoid extraneous pragma messages. - Jonathan M Davis _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
