3 ms·
The difference between "should be safe if your ocaml code is good" and "is safe" is the thing that allows you to use tooling to delete the code. Otherwise the
by habitue 6y ago
The difference between "should be safe if your ocaml code is good" and "is safe" is the thing that allows you to use tooling to delete the code.
Otherwise the best you can do is lint and rely on a human to use their best judgement about whether to remove it or not.
- kazinator 6y agoAnd then there is C++. The C++ language allows temporary objects to be generated and/or optimized away. Those objects can have constructors and destructors with side effects, and those side effects appear or go away together with the object to which they are attached. If your program depends on whether a temporary object does something or not, you are officially screwed.
- sweeneyrod 6y agoelm-review still has a confirmation prompt though, right? You don't want to instantly remove an unused value, because you might be in the middle of writing code and about to use it.