Teach Rust! Do NOT Teach C!

In March 2020, I enrolled in a Master in Computer Science and all students must attend the “Analysis of Algorithms” course. This “Analysis of Algorithms” course has a few projects and the first project is to implement a trie, also called digital tree or prefix tree, in C.

Students’ experience with C varies and the project throw the students under the bus! For students without previous contact with project organisation, documentation, testing and other software programming practices, use C for this project might re-inforce unsustainable software development.

I was reading the official Rust Getting started page and the “Hello, world!” mentions everything necessary for a new user:

  • how to make a new project? cargo new hello-rust
  • how to keep metadata for the project? Cargo.toml
  • how to keep dependencies for the project? Cargo.toml
  • how to compile the source code? cargo build
  • how to run the project? cargo run
  • how to run the project’s test? cargo test
  • how to build the project’s documentation? cargo doc

For C, we don’t have a official “Getting started” page so we will get the first result from Google.

ev3dev’s Getting Started with C is fabulous because it mentions Makefile, it helps towards the project sustainability. Unfortunately, it doesn’t cover metadata, dependencies, tests, and documentation. Other introductions to C, for example Wikibooks’ C Programming/Intro exercise doesn’t even mention Makefile.

Next time, consider require students to use a programming language that has a lower bar to new users regarding sustainability!

You may also enjoy...