Hacker News new | ask | show | jobs
by gergo_barany 749 days ago
Cool stuff! A suggestion: Avoid the term "dead code elimination". Yes, it is an established term, but it is established as a term for two distinct optimizations.

One form of "dead code" is code that can never be executed:

    if (false) {
        someDeadCode; // "dead"
    }
The other meaning is code that can be executed but computes a value that can never be used:

    x = someValue;
    y = someOtherValue;  // "dead"
    return x;
I advise my students to use the terms "unreachable code" and "unused code", respectively.
1 comments

Ah, this is a useful distinction. Thanks.