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

doc: improve modules high-level pseudocode algorithm #26958

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@jtakalai
Copy link

jtakalai commented Mar 28, 2019

Improve pseudocode of require.resolve()

Current flow suggests the CONTINUE happens
without decrementing I (step 4d), looping forever.
Fixed by writing a for loop instead, because that's what it is.

Also improved pseudocode ranges readability
(is 0..I inclusive? Probably half-inclusive),
though of course the edge cases (e.g. I = 0)
are not literally described by the notation.

Checklist
Update modules.md
Current flow suggests the CONTINUE happens without decrementing I (step 4d), looping forever. Fixed by writing a for loop instead, because that's what it is.

Also improved pseudocode ranges readability (is 0..I inclusive? Probably half-inclusive), though of course the edge cases (e.g. I = 0) are not literally described by the notation.

@BridgeAR BridgeAR changed the title Update modules.md doc: improve modules high-level pseudocode algorithm Mar 28, 2019

@BridgeAR

This comment has been minimized.

@BridgeAR

This comment has been minimized.

Copy link
Member

BridgeAR commented Apr 4, 2019

@nodejs/documentation @nodejs/modules This could use another review.

@ljharb
Copy link
Contributor

ljharb left a comment

I’m not sure it’s worth changing this; and i don’t necessarily find the changes an improvement.

If it’s worth changing, maybe let’s change it to javascript, since it’s a language node users will know?

@BridgeAR BridgeAR requested review from guybedford and devsnek Apr 10, 2019

@devsnek

This comment has been minimized.

Copy link
Member

devsnek commented Apr 11, 2019

I preferred the explicit while I >= 0, can we preserve that? the only change I would make here is 0 .. I -> 0 .. I inclusive

@BridgeAR

This comment has been minimized.

Copy link
Member

BridgeAR commented Apr 15, 2019

Ping @jtakalai

@BridgeAR BridgeAR removed the author ready label Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.