20
Learning Rust (lemmy.ca)
submitted 5 days ago by kionite231@lemmy.ca to c/rust@lemmy.ml

Hello,

I have started learning Rust. I have only made a fibonaci series program so far but I would make more complex program as I progress in learning Rust :D

you are viewing a single comment's thread
view the rest of the comments
[-] Ephera@lemmy.ml 4 points 5 days ago

Yeah, it's a bit of a stretch goal. ๐Ÿ™ƒ

When I learn a new language, I like to implement the Sieve of Erastothenes (which is a simple algorithm for finding prime numbers), and I had done so with Rust. Two years or so later, I looked back at that code and thought, damn, that looks like a Java dev wrote it.

Then I realized the most idiomatic way of implementing that would be an iterator. This was actually an interesting challenge, because typically Sieve of Erastothenes uses an upper bound, which I didn't want to have.
But yeah, it was also just wild to me, how much different the iterator code looked (and in many ways, how much better it was). It was just really cool to see, how much I had progressed in those two years.

this post was submitted on 21 Dec 2024
20 points (95.5% liked)

Rust Programming

8219 readers
3 users here now

founded 5 years ago
MODERATORS