Do you think it is rust that popularized this?
Re:Compile-Time DI vs. Run-Time DI
by chriswarbo on Tuesday April 30, 2019 @10:57AM
(#19788493)
It's been standard programming dogma for decades, e.g. https://developers.slashdot.org/story/03/10/21/0141215/softw...
Why Rust? Strongly typed languages had this capability for a long time.
I believe what he means is that Rust takes this a step further by ensuring memory safety at compile time.
Rust is merely the latest in a long line of efforts in that direction. It may have located a particularly nice point in the cost/benefits space, and the borrow semantics I believe are novel, but it's well inline with many efforts to make compile time errors out of as many things as possible, from a lot of C++ stuff, Ada, Eiffel, Haskell, a variety of proof methods, the list goes on, and even the things I list are themselves exemplars of entire streams of thought on the idea rather than a complete list, of course.
(This is not a criticism of Rust. It is not a criticism of a work to place it correctly in its historical context. Very few things consist entirely of novel ideas, and very few of those are any good, if any.)
Catching things early and often. Tooling that shifts things further left in the pipeline is my go-to default.