Rust’s Golden Rule

By | May 13, 2023

I stumbled across this blog post (https://steveklabnik.com/writing/rusts-golden-rule) a short time ago. The author spends a bit of time on a concept that is pretty much normal for compiled languages, and almost completely missing from dynamic languages: function signatures.

In particular, he points out that Rust’s requirement that we are explicit about function signatures means that Rust can quickly let us know if the body of the function violates the signature.

What I find most interesting about this is not that this is some “wonderful rule of Rust”, is the difference between those of us who are oldsters and started programming with compiled languages and the newer crop of programmers that have almost always worked in dynamic languages. This a shift in world-view that changes how you think of some programming solutions.

Leave a Reply

Your email address will not be published. Required fields are marked *