{"id":66,"date":"2023-05-13T18:46:29","date_gmt":"2023-05-13T18:46:29","guid":{"rendered":"https:\/\/blog.gwadej.org\/micro-musings\/?p=66"},"modified":"2023-05-13T18:46:29","modified_gmt":"2023-05-13T18:46:29","slug":"rusts-golden-rule","status":"publish","type":"post","link":"https:\/\/blog.gwadej.org\/micro-musings\/2023\/05\/rusts-golden-rule\/","title":{"rendered":"Rust&#8217;s Golden Rule"},"content":{"rendered":"\n<p>I stumbled across this blog post (<a rel=\"noreferrer noopener\" href=\"https:\/\/steveklabnik.com\/writing\/rusts-golden-rule\" target=\"_blank\">https:\/\/steveklabnik.com\/writing\/rusts-golden-rule<\/a>) 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.<\/p>\n\n\n\n<p>In particular, he points out that Rust&#8217;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.<\/p>\n\n\n\n<p>What I find most interesting about this is not that this is some &#8220;wonderful rule of Rust&#8221;, 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s requirement that we are explicit about function signatures means that\u2026 <span class=\"read-more\"><a href=\"https:\/\/blog.gwadej.org\/micro-musings\/2023\/05\/rusts-golden-rule\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[49,48,20,47],"_links":{"self":[{"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/posts\/66"}],"collection":[{"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":1,"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/posts\/66\/revisions\/67"}],"wp:attachment":[{"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gwadej.org\/micro-musings\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}