0%

2024秋冬开源操作系统训练营第一阶段总结-杨学聪

After the first stage of the 2024 autumn winter open source operating system training camp, I would like to share my experience and summary with you.

It was the training camp that made me touch the magic programming language – Rust.

In the stage, I learned the basic knowledge of Rust, and met a lot of like-minded students.

Before, besides assembly, I write the documents with only C series languages (C, C++ and C#). I was not able to imagine how the “memory-safety” would be. But after the touching the Rust, I found that the Rust is not only a simple language. Rust can check your code in compile time, considering the using for multi-thread, memory-leak, and the optimization in general.

Below are the impressive places that Rust has left me:

  • unsafe keyword: Like C#, Rust has a unsafe keyword, which is used to mark the code, which cannot be assured by the compiler. This enables us plug in the special code, solving the possible lack for the implementation of the current supply.

  • ownership and lifetime system: Rust has a very special ownership system, which is different from the C series language. It can help us to avoid the memory leak or multi-reference. In other languages, we may forget to consider the mechanism about variable usage.

  • trait: Rust has a very special trait system, which is similar to the interface in C#. It can make the code more flexible and reusable. We can avoid pure-virtual class in C++, which may import v-table making us uncomfortable.

  • default immutable: This encourages me to delare more variable when writing codes, which makes code more readable.

However, there are still a lot I need to learn. In fact, I have not mastered standard C and C++ yet. This let me have a weakness in computer programming – I cannot consider from all sides to output a great code.

In the future, I’d like to study the Embedded-development relatived knowledge of Rust.

Thank you. Thanks to teachers and the people who have helped me.

Dosconio.

2024AD Nov 10, Sun.