Skip to content

why need both common and common2 in json0.transformComponent? #35

Open
@happy15

Description

Hi there, some questions when reading the source code:

  1. From the implementation I can see that json0.commonLenghtForOps(a,b) is not symmetry, i.e.commonLengthForOps(a,b) may not be the same as commonLengthForOps(b,a), why is that? From the comment above ("Returns the common length of the paths of ops a and b") I cannot get the point.

  2. Since json0.commonLenghtForOps(a,b) is not symmetry, I can see that common and common2 in json0.transformComponent(dest,c,otherC,type) may not be the same. But what's their respective purposes? Without some hint, it's hard to figure out by just reading the code, since the code includes many things, such as backward compatibility, code path merge, etc.

Thanks in advance and looking forward to the reply.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions