歡迎參加第 1 天課程

今天是學習 Rust 基礎知識的第一天,我們會探討許多內容:

  • 基本的 Rust 語法:變數、純量和複合型別、列舉、結構體、參照、函式和方法。
  • Types and type inference.
  • 控制流程結構:迴圈、條件式等。
  • 使用者定義的型別:結構體和列舉。
  • 模式配對:解構列舉、結構和陣列。

課程時間表

Including 10 minute breaks, this session should take about 2 hours and 10 minutes. It contains:

SegmentDuration
歡迎5 minutes
Hello, World15 minutes
型別和值45 minutes
基本的控制流程概念40 minutes
This slide should take about 5 minutes.

請提醒學生以下事項:

  • 應該一有問題就提問,不要留到最後。
  • 本課程的宗旨是互動,非常鼓勵大家討論!
    • As an instructor, you should try to keep the discussions relevant, i.e., keep the discussions related to how Rust does things vs some other language. It can be hard to find the right balance, but err on the side of allowing discussions since they engage people much more than one-way communication.
  • 我們討論的議題,可能會超前投影片進度。
    • 這完全沒問題!複習是學習的重要一環。請記得,投影片只是輔助,您可以視情況略過不需要的部分。

第一天的規畫是說明 Rust 中能夠直接對應到其他語言的「基礎」概念。後續幾天則會介紹更進階的部分。

如果您是在教室授課,就很適合參考這裡的時間表。請注意,每個主題結束後都有練習,然後才是休息時間。請規劃在休息後講解練習的解決方案。此處列出的時程建議是要確保課程進度。您可以視需要彈性調整!