Hacker News new | ask | show | jobs
by tomtom1337 14 days ago
What is the definition of dead code that Unref uses? I distinguish between apps and libraries. In apps I can see how any code not callable from the entrypoint is dead, and for libraries I guess a definition is any code that is not callable from a public api?

Would be nice to see the definition used placed in the docs/github readme.

1 comments

Yeah exactly, for apps it's any code that is not reachable from the app entry point, and for libraries is any code not reachable through the public API.

I've updated the README and added a FAQ section in the docs to explain this, thanks for the question!

Here's the PR - https://github.com/Apakottur/unref/pull/121