placeholder

Aiming for correctness with types - fasterthanli.me

The Nature weekly journal of science was first published in 1869. And after one and a half century, it has finally completed one cycle of carcinization , by publishing an art...

Click to view the original at fasterthanli.me

Hasnain says:

Continuing the Rust hype train, this was a good example of how to model correct code by construction - utilizing the type system.

"But also, restructuring your program so that state is neatly separated, so you don't get into heated discussion with the borrow checker. Fields will start being grouped by "mutation affinity" rather than by "theme", as you may have done in other languages previously. You'll end up naming quite a few structs State.

It really is a wonderful journey, and even if you still have to write other languages for your day job, the experience you'll acquire learning Rust is applicable in other languages too - even C++!"

Posted on 2020-12-29T02:04:23+0000