deprecated 是一个形容词/过去分词,意为"被弃用的,不推荐使用的"。常用于技术领域,表示某个功能、方法或做法虽然仍然可用,但已不再被推荐,未来可能会被移除。在更广泛的语境中,也可以表示"反对的,不赞成的"。
/ˈdɛprɪkeɪtɪd/
This method is deprecated and will be removed in the next version.
这个方法已被弃用,将在下一个版本中移除。
The committee deprecated the use of outdated protocols, urging all departments to migrate to the new standard before the end of the fiscal year.
委员会反对继续使用过时的协议,敦促所有部门在财年结束前迁移到新标准。
deprecated 源自拉丁语 deprecari,由 **de-**(表示"远离")和 precari(意为"祈求")组合而成,原义为"通过祈祷来避开某事",即"祈求免除"。后来在英语中逐渐演变为"表示反对、不赞成"的意思。进入计算机领域后,这个词获得了"弃用"的特定含义,用来标记那些仍可运行但已不被推荐、将来可能被移除的功能或接口。
@Deprecated 注解来标记不推荐的类和方法。