DEV Community

Discussion on: Which programming language features do you love and why?

Collapse
 
dwayne profile image
Dwayne Crooks

Yeah, Rust is really nice.

I like that you can do systems level programming using high-level programming abstractions. And its borrow checker, I'd love to learn the theory behind it someday.

What are you working on with Rust?

Collapse
 
dfockler profile image
Dan Fockler

The borrow checker is actually surprisingly simple, although the consequences of having it are complex. Basically you can either borrow immutably, borrow mutably, or own data. An immutable borrow can be shared in many contexts at a time, a mutable borrow can only be shared with one context at a time, and ownership means you're giving up that data to another context.

I've been working on a raytracer/pathtracer. Although I'm not very good at the trig yet. I also wrote a Piet language interpreter.

Thread Thread
 
dwayne profile image
Dwayne Crooks

Interesting that you're working on a raytracer. That is the project I plan to do when I decide to learn Rust.

I started implementing one many years ago in C but never completed it. Then, I did one in Python to relearn the concepts but it's obviously slow as hell. Rust would be ideal.

All the best with your raytracer.

Thread Thread
 
dfockler profile image
Dan Fockler

Thanks! You too.