8000 egg - JSConf China 2016 - 企业级的 Node 框架 · Issue #13 · atian25/blog · GitHub
[go: up one dir, main page]

Skip to content

egg - JSConf China 2016 - 企业级的 Node 框架 #13

Open

Activity

  1. Kaijun commented on Sep 8, 2016

    @Kaijun

    请教下 getter大量使用 Symbol.for 的意义是什么?

    1. 为了实现(半)私有变量?
    2. 用户要是知道变量的命名空间 同样使用 xxx[Symbol.for('namespace')] 就可以访问到吗?
      是针对上面两点的考量吗?
  2. atian25 commented on Sep 8, 2016

    @atian25
    OwnerAuthor

    并没有大量使用,很多都是内部 Symbol,没有 for

    只有 view 和 loader,eggPath 使用了,当时的考虑到的是框架可以多级继承,一层一层传不好,现在新的继承机制后可以考虑 export 出来,这个我们还在讨论。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0