3 ms·
( cont. from https://news.ycombinator.com/item?id=31999774 https://news.ycombinator.com/item?id=31999774 ) > … no algorithm that can identify all dead code rel
by igouy 4y ago
( cont. from https://news.ycombinator.com/item?id=31999774 https://news.ycombinator.com/item?id=31999774 )
> … no algorithm that can identify all dead code reliably…
Why were you so concerned with the removal of all dead code?
Compared to "… nobody had the source code…" it seems like a minor issue.
- igouy 4y ago( cont. ) imo the more usual concern would be mistakenly removing code that was not dead. Without a design document, we might think there would be no senders of #factorial without understanding that the intention was to invoke that method on the command line. For example, $ cat fact.st Stdio stdout nextPutAll: 100 factorial printString; nextPut: Character lf.! SmalltalkImage current snapshot: false andQuit: true! $ bin/pharo --headless Pharo10-SNAPSHOT-64bit-502addc.image fact.st 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 So instrumenting methods and logging — https://stackoverflow.com/a/162719 https://stackoverflow.com/a/162719