V2EX  ›  英汉词典

Refactor

释义 Definition

(尤指在不改变外部行为的前提下)对代码内部结构进行重组与改写,使其更清晰、更易维护、更易扩展;常见于软件开发与代码优化语境。也可泛指对文章、流程等进行“重新组织/改写”。

发音 Pronunciation (IPA)

/ˌriːˈfæk.tər/

例句 Examples

I refactored the function to make it easier to read.
我重构了这个函数,让它更容易阅读。

After refactoring the codebase, the app ran faster and bugs became easier to trace, even though the features stayed the same.
在重构整个代码库之后,应用运行更快、问题也更容易追踪,尽管功能保持不变。

词源 Etymology

refactor 由前缀 re-(“再次、重新”)+ factor(“因素、做……的人/物;在数学中也有‘因子’之意”)构成。现代软件工程中,“refactor”专指“在不改变可观察行为的情况下改进内部结构”的做法,强调“重新梳理结构”而非“添加新功能”。

相关词 Related Words

文学与作品 Literary Works

  • Martin Fowler, Refactoring: Improving the Design of Existing Code(《重构:改善既有代码的设计》)
  • Robert C. Martin, Clean Code(《代码整洁之道》)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   3933 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 02:55 · PVG 10:55 · LAX 18:55 · JFK 21:55
♥ Do have faith in what you're doing.