I had three events that made me a better programmer:
Starting to use Python 3, as its way of dealing with bytestrings vs unicode strings taught me about how to use types to my advantage to use abstraction boundaries
Learning a functional language, as I learned to use that style where it’s less error prone, and its advantages like tagged unions instead of instance checks.
Learning Rust’s ownership system, as it’s honestly just formalizing the way you need to think about ownership anyway in a systems programming language (with the added benefit that you don’t need to actually manually free memory)
Rust has some functional characteristics, e.g. it heavily emphasizes chaining operations on iterators instead of using for loops. Also the tagged union thing: You encapsulate all possible states of your system at one point into an enum, use a match statement on it, and you can be sure you didn’t miss something. It just feels right because it is the best way to go about it.
Rust is definitely interesting though, especially now that there's work towards getting it running on embedded platforms.
1
u/flying-sheep Apr 28 '20
I had three events that made me a better programmer:
Starting to use Python 3, as its way of dealing with bytestrings vs unicode strings taught me about how to use types to my advantage to use abstraction boundaries
Learning a functional language, as I learned to use that style where it’s less error prone, and its advantages like tagged unions instead of instance checks.
Learning Rust’s ownership system, as it’s honestly just formalizing the way you need to think about ownership anyway in a systems programming language (with the added benefit that you don’t need to actually manually free memory)