Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/just-cameron/web-files. Build files for the website.
Something went wrong. Try again.
12345678910111213141516171819202122---title: "Rust & More"author: Cameron Pfifferdate: 2018-06-03T21:01:18-07:00draft: false---
<p>For the past two or so weeks I’ve been spending a lot of time writing <a href="https://www.rust-lang.org/">Rust</a>. Rust is a really spectacularly designed language with perhaps the greatest package manager<label for="tufte-mn-" class="margin-toggle">⊕</label><input type="checkbox" id="tufte-mn-" class="margin-toggle"><span class="marginnote">It’s called <a href="https://crates.io/">Cargo</a>.</span> I have ever experienced.</p><p>Rust is fascinating to me because it’s one of my first true compiled languages. In contrast to the other languages I’m somewhat good at:</p><ul><li>R (mostly interpereted)</li><li>Python (interpereted)</li><li>C# (JIT compiled)</li><li>Julia (JIT compiled)</li></ul><p>I am only passingly familiar with C and have mostly repressed C++, so Rust was both new and refreshing to me. The workflows are strikingly different – with Julia or R or what have you, I go through a very rapid iterative process. Write something, run it, see what worked, fix it, move on to the next issue. It’s very slapdash.</p><p>With Rust (and, I presume other compiled languages), I have to stop and <em>think</em> a lot more about what I’m doing and how I’m doing it. This is a bit more important in Rust because of the concept of <strong>ownership</strong>, an entirely bizarre concept of who owns what thing in any given program.</p><p>My (admittedly frail) understanding of ownership is that everything that exists in a program is owned by a varible. Once that variable goes out of scope, the memory allocated goes with it. It’s how Rust manages memory safety. It has a pretty steep learning curve initially, but once you’ve learned it it’s almost effortless to use.</p><p>All in all, it’s a spectacular language. Fast, too. And ultra strongly typed with none of the rigid puritanical stuff that comes with Haskell.</p>