天天看点

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