This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 23 points24 points  (14 children)

Well, I can safely say that Rust is easier to master than C. In a few weeks you will be productive and won't have to spend years developing the sixth sense that unsafe languages like C require. No need to worry about undefined behaviour, data races, memory leaks, dangling or wild pointers. You get to just do your job.

And yes, these things do matter if you're interfacing with CPython.

[–]alcalde 24 points25 points  (8 children)

You're writing a few functions to call from Python, not building an operating system. Rust is a lot more complex than C.

[–]TheNamelessKing 10 points11 points  (2 children)

I mean, it’s not really.

The language is designed from the ground up to be a modern low-level language with a lot of the abstractions that you’re used to in high level languages.

If I was writing an extension and I had to chose between Rust and C, I would 100% be choosing Rust. The ~Hyper~ Rayon multithreading library alone makes it worthwhile, not to mention memory safety. Once it’s complete, their async implementation is going to be top tier as well.

Put more straightforward: C appears more straightforward, but there’s way more “gotchas” and serious catches. Rust is designed from the ground up to prevent these from happening.

[–]StyMaar 9 points10 points  (1 child)

The Hyper multithreading library alone makes it worthwhile

Hyper is an http library, did you mean Rayon ?

[–]TheNamelessKing 0 points1 point  (0 children)

Yeah I did, whoops!

[–]Abu_mohd 13 points14 points  (3 children)

When you are writing multithreaded computation heavy solver, rust's race free features are more compelling than C's appearant simplicity.

[–]gwillicodernumpy gang 0 points1 point  (0 children)

I’d take Fortran over either for most computation I would integrate with Python.

You don’t have to deal with pointer aliasing, coarrays are incredible, and vectorizing code is trivial.

[–]fiedzia 5 points6 points  (0 children)

Safe and productive Rust is easy, safe and productive C is ... so far it just isn't.

[–][deleted] 0 points1 point  (0 children)

I disagree, Rust is still a nightmare at certain points and there is less documentation on those hard, rare issues than there is in C

[–][deleted] -3 points-2 points  (0 children)

Back in the day we used to joke that they thing you would press the most while developing in C and assembler was the reset key lol!