Giter Site home page Giter Site logo

attribute 添加 modify 接口 about base HOT 2 CLOSED

aralejs avatar aralejs commented on July 17, 2024
attribute 添加 modify 接口

from base.

Comments (2)

lifesinger avatar lifesinger commented on July 17, 2024

不是很认可添加这个语法糖。原来的代码看起来多些,但挺清晰的。

基础模块,我觉得我们可以遵循 Go 语言的最小心智负担原则,包括

  1. 最小特性
  2. 最小惊异
  3. 最小犯错机会

最小特性原则指的是:如果一个功能不对解决任何问题有显著价值,那么就不提供。

如果我们能达成一致认可上面的原则的话,那么 modify 就没必要提供。还有一个原因是,modify 是个很好很常见的方法名,很容易被实例上的方法覆盖掉。YUI 有提供 modifyAttr 方法,但功能不一样。Backbone 则没有提供,保持功能的精简。

from base.

popomore avatar popomore commented on July 17, 2024

好,要使用可以自己添加

Sent from Mailbox for iPhone

On Wed, Aug 7, 2013 at 9:49 AM, lifesinger [email protected]
wrote:

不是很认可添加这个语法糖。原来的代码看起来多些,但挺清晰的。
基础模块,我觉得我们可以遵循 Go 语言的最小心智负担原则,包括

  1. 最小特性
  2. 最小惊异
  3. 最小犯错机会
    最小特性原则指的是:如果一个功能不对解决任何问题有显著价值,那么就不提供。

如果我们能达成一致认可上面的原则的话,那么 modify 就没必要提供。还有一个原因是,modify 是个很好很常见的方法名,很容易被实例上的方法覆盖掉。YUI 有提供 modifyAttr 方法,但功能不一样。Backbone 则没有提供,保持功能的精简。

Reply to this email directly or view it on GitHub:
#29 (comment)

from base.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.