天天看點

Wafflespeanut: How rust taught me to think about system

Wafflespeanut: How rust taught me to think about system

非常風趣

Wafflespeanut: How rust taught me to think about system

How I thought of movement?

How I thought of memory?

其他語言中的坑,比如:

Wafflespeanut: How rust taught me to think about system

而,rust中,寫這種代碼,直接通不過的。

下面是舉例寫一個csv到json的轉換工具,實作這個過程中的各種方案的取舍,改進,演化。

下面是講一個并發的例子,很精彩。

先是講py得例子

Wafflespeanut: How rust taught me to think about system

然後講 swift

Wafflespeanut: How rust taught me to think about system

他們在并發的時候,都容易寫出問題。

而rust這樣寫

Wafflespeanut: How rust taught me to think about system

根本編譯不過

Wafflespeanut: How rust taught me to think about system