Mutator
Definition / 释义
mutator(名词):用于改变某个对象/系统状态的人或事物。常见用法有两类:
- (编程)修改器/设值函数(setter):用于修改对象成员变量或属性的函数/方法。
- (遗传学)诱变因子/诱变基因(mutator gene):会提高突变率、从而增加遗传变异的基因或机制。
Pronunciation / 发音
/ˈmjuːteɪtər/
Examples / 例句
The class provides a mutator to change the user’s password.
这个类提供了一个修改器,用来更改用户的密码。
In evolutionary genetics, a mutator allele can spread when higher mutation rates help a population adapt to new environments.
在进化遗传学中,当更高的突变率有助于种群适应新环境时,诱变等位基因可能会扩散。
Etymology / 词源
mutator 来自 mutate(改变、突变)+ -or(表示“执行者/作用者”的后缀),其更早可追溯到拉丁语 mutare(改变)。因此该词核心含义就是“使……发生改变的东西/机制”。
Related Words / 相关词
Literary Works / 文学作品
- Bjarne Stroustrup《The C++ Programming Language》:在讨论类设计与接口时,常用 accessor/mutator 区分“读取”与“修改”成员状态的方法。
- Scott Meyers《Effective C++》系列:涉及 const 正确性与接口设计时,会用 mutator 指代会改变对象状态的成员函数。
- 遗传学与进化生物学相关著作/论文集(如关于 mutator gene 的章节与综述):在解释“诱变基因”“突变率演化”等主题时频繁出现 mutator。