به روز ۱ خوش آمدید

این اولین روز از مبانی Rust است. ما امروز بخش‌های فابل توجه‌ای را پوشش خواهیم داد:

  • سینتکس‌های مقدماتی: متغیرها, تایپ‌های عددی و تایپ‌های مرکب, enums, structs, مراجع, توابع, و متدها.
  • Types and type inference.
  • Control flow constructs: loops, conditionals, and so on.
  • User-defined types: structs and enums.
  • تطابق الگو: تجزیه و تحلیل enums, structs و آرایه‌ها.

Schedule

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

SegmentDuration
خوش آمدید5 minutes
سلام دنیا15 minutes
Types and Values40 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.
  • احتمالاً سؤالات به این معنی است که ما در مورد چیزهایی قبل از اسلاید صحبت می کنیم.
    • این اصلاً اشکالی ندارد! تکرار بخش مهمی از یادگیری است. به یاد داشته باشید که اسلایدها فقط یک پشتیبان هستند و شما می توانید هر طور که دوست دارید از آنها صرف نظر کنید.

The idea for the first day is to show the “basic” things in Rust that should have immediate parallels in other languages. The more advanced parts of Rust come on the subsequent days.

If you’re teaching this in a classroom, this is a good place to go over the schedule. Note that there is an exercise at the end of each segment, followed by a break. Plan to cover the exercise solution after the break. The times listed here are a suggestion in order to keep the course on schedule. Feel free to be flexible and adjust as necessary!