Skip to content

关于 Fiber 架构的心智模型 的疑惑 #103

Open
@iolh

Description

@iolh

1635835128(1)

卡子哥,这节代数效应与Fiber中的描述是否有误?

所谓代数效应就是解耦程序逻辑和具体实现,目的是:

JS 中并没有代数效应的概念,Generator 污染外层函数也没有践行代数效应的理念,正因此 React 自己实现 Fiber,作为协程的一种实现,并且践行了代数效应,算是对 JS 的一种扩展。

结论:“所以,我们可以将纤程(Fiber)、协程(Generator)理解为代数效应思想在JS中的体现” 应该修改为 “所以,我们可以将纤程(Fiber)理解为代数效应思想在JS中的体现”。

不知描述是否有误,请多指教!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions