xoxo419

代码的抽象三原则

  •  
  •   xoxo419 · Feb 22, 2018 · 1675 views
    This topic created in 3041 days ago, the information mentioned may be changed or developed.

    "抽象化",就是指从具体问题中,提取出具有共性的模式,再使用通用的解决方法加以处理.

    三原则

    • DRY-Don't repeat yourself
    • YAGNI-You aren't gonna need it
    • Rule of three

    "三次原则"是 DRY 原则和 YAGNI 原则的折衷,是代码冗余和开发成本的平衡点,值得我们在"抽象化"时遵循

    代码的抽象三原则

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2710 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:45 · PVG 20:45 · LAX 05:45 · JFK 08:45
    ♥ Do have faith in what you're doing.