-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from ccaikano/master
2024春季开源操作系统训练营第一阶段总结-cc
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: 2024春季开源操作系统训练营第一阶段总结-cc | ||
date: 2024-04-25 16:02:48 | ||
tags: | ||
--- | ||
|
||
|
||
|
||
# rust的学习 | ||
|
||
因为之前学过一些c++,有一定的基础,对rust的学习真的帮助挺大的。rust里的所有权,智能指针,移动语义都能在c++里找到对应的东西,rust学起来还是挺轻松的。 | ||
|
||
相较于c++,rust使用起来真的太舒服了。使用match进行流程控制十分优雅,宏也比c++的宏更加强大,rust泛型编程的类型萃取使用起来也比c++方便,更不用说`cargo`包管理对c++简直就是降为打击。 | ||
|
||
代价是rust的`unsafe`用起来有点丑陋。 | ||
|
||
|
||
|
||
# rustlings实验 | ||
|
||
前一百道题通过看 [Rust 程序设计](https://kaisery.github.io/trpl-zh-cn/) 、 [rust官方api文档](https://doc.rust-lang.org/std/index.html) 和问gpt都能够轻松的完成。 | ||
|
||
后十道数据结构题目就遇到麻烦了,主要是对 rust `unsafe` 操作的不熟悉,写起来真的折磨。在认真学习了解rust 指针操作后,有算法基础数据结构实现还是比较好实现的。 | ||
|
||
|
||
|
||
# 总结 | ||
|
||
rust入门可以认真看完 《Rust 程序设计》,不理解的地方问gpt和百度。再写完rustlings, 最后在github上找个练手项目去理解代码尝试自己实现。 | ||
|