I just finished sections 24 to 36 of chapter 4 of the Rust book. Here’s what I felt:
- The crates and modules system to organize projects is simple and intuitive.
- Attributes remind me of Java Annotations.
- Associated types seem like an improvement over generics. They seem like an important concept to write effective Rust code and I wish that this chapter had gone into more details and had a larger example.
- Rust supports macros. As the chapter mentions, I probably wouldn’t write one unless I absolutely had to. If Rust supported variable number of arguments to functions one could probably implement
vec!
using that plus generics.
unsafe
seems like a very powerful and tricky Rust feature. I wish the chapter had an actual example that demonstrated how to useunsafe
correctly. And also an example of when not to useunsafe
— for example when you’re writing bad Rust code and usingunsafe
to mask a bad design.
(You can find my thoughts on the previous chapters / sections here)
One thought on “Oxide”