Message from JavaScript discussions
April 2017
— You will find completely different uses between them
Yes, this is the last playground I used and give me the light, DO NOT RUN IT, It will block the REPL.
Promise.resolve().then(() => {
while(true);
})
console.log('Then')
setTimeout(() => console.log('Time is out'), 100)
— Hehe
— Because before I used the new Promise, and I had the power to cancel, but i'm not in power after the .then runs in the next tick
— Lmao. I learned a lot today.
— Just came up with a way to use yield
to detect cyclic graphs
— Allows the entire call stack to pause, exchange information, and resume
— Therefore no map
or any other reference tracking data structure is needed, and the objects checked are kept to a logical relevant minimum
— This method does not detect certain cycles though and is still highly theory, maybe some in here will have a comment on this?
— I posit if a cycle exists laterally from a node, say in a different property of the root node, the call stack does not provide enough information to detect that cycle, and will fail
— What this *does* detect well is any circular reference
— Interesting, I loved the diagram