Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
happy15 opened this issue Jan 8, 2021 · 0 comments
Open

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

happy15 opened this issue Jan 8, 2021 · 0 comments

Comments

@happy15
Copy link

happy15 commented Jan 8, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant