|
|
|
|
|
by falcolas
1465 days ago
|
|
Is this a serious question? Code analysis (both static and dynamic). The same way Rust checks for object lifespans with the borrow checker, which is distinct from the compiler and type system. The same way valgrind for C can check for use after free. The same way errorprone can look for null checks in Java. This is a well tested and proven technique. Static code analysis is a staple of the industry, when it comes to automated code analysis. |
|
All of the examples you gave are from static languages, where the information is known at compile time (except for valgrind, which requires a runtime). The parent to my original post was claiming that you can have the same tooling for Ruby.
Also, you're wrong about Rust. Lifetimes are part of the type system.