参见英文答案 > The Difference Between Deprecated, Depreciated and Obsolete [closed] 8个
C#具有名为“Obsolete”的属性,表示不再使用该函数.在.net API规范中,当类/函数过时时,我们说这是“已弃用”.所以我想知道“过时”和“弃用”之间的区别.
>如果他们的意思相同,我们不需要2个字,对吗?
>如果他们的意思不同,为什么有时他们似乎在谈论同一个概念呢?
谢谢.
解决方法:
I don’t think that there is a strictly adhered-to distinction enforced
within the field of computer science. But in most contexts that I have
read, deprecated is more or less a “marker”, saying that it should not
be used, something else that has the same effect has been created, and
it is soon to be deleted. It may still work as expected (read the last
paragraph on why I say may), but it will vanish soon. This is
intentionally done as part of the software development life cycle when
transitioning from one system to another–all of the functionality of
the old system is maintained in order to ensure that all past programs
still work, and it gives the developers time to transition their code
over to the new system.Obsolete means that it no longer works as expected, or doesn’t do
anything at all. This is different from non-functional, as it implies
that it was rendered so by a new functionality, or its function is
simply no longer relevant under the new parameters.The line between these two terms gets blurred when a function is both
deprecated and obsolete. Most of the time, an obsolete function gets
deprecated, since it is preferable to deter developers from using it,
and to delete it. Since it is generally advisable not to use a
deprecated function, whether or not said function is also obsolete is
irrelevant, and thus the conflation of the two terms.