Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Blog Pricing

Sebastian Scholz

๐Ÿ‘ค Speaker
485 total appearances

Appearances Over Time

Podcast Appearances

Rust in Production
Gama Space with Sebastian Scholz

But we are constantly fighting that.

Rust in Production
Gama Space with Sebastian Scholz

For example, in cases where we do need a buffer for certain things and we know beforehand that we need a certain size,

Rust in Production
Gama Space with Sebastian Scholz

You can add certain trade bounds using the unstable const generic features that prevent you from needing to use unwrap and then just giving you the actual value that you want without using a result or an option.

Rust in Production
Gama Space with Sebastian Scholz

And that's only possible because you let the compiler validate these preconditions at compile time.

Rust in Production
Gama Space with Sebastian Scholz

flattening the learning curve, that's a big kind of issue in Rust, I would say, compared to Python, for example.

Rust in Production
Gama Space with Sebastian Scholz

I think just learning, trying things out and learning by example is the easiest way to do.

Rust in Production
Gama Space with Sebastian Scholz

Unfortunately, I don't have a fix, like a solution for everyone.

Rust in Production
Gama Space with Sebastian Scholz

But the thing is, you're struggling a bit with the compiler, right?

Rust in Production
Gama Space with Sebastian Scholz

is a bit frustrating in the beginning, but it's a very valuable learning experience.

Rust in Production
Gama Space with Sebastian Scholz

So if you start out using Rust and you're having trouble with lifetimes, with borrowing, whatever, it is the compiler trying to help you.

Rust in Production
Gama Space with Sebastian Scholz

And once you realize this, once you understand that the structures and the ways you did it before

Rust in Production
Gama Space with Sebastian Scholz

are a little bit flawed in regard.

Rust in Production
Gama Space with Sebastian Scholz

Once you understand this, it does help you.

Rust in Production
Gama Space with Sebastian Scholz

Unfortunately, it is a hard pill to swallow sometimes, but it's very useful.

Rust in Production
Gama Space with Sebastian Scholz

I myself, after learning Rust this way, have come back to various Python projects and found out that code that I thought was perfectly fine, that I wrote many years ago,

Rust in Production
Gama Space with Sebastian Scholz

actually had subtle problems that could occur under some circumstances, not all of the time, but sometimes.

Rust in Production
Gama Space with Sebastian Scholz

And so these, for example, if you have multiple threads and you access certain variables for multiple threads in Python, there's very little help for you to avoid

Rust in Production
Gama Space with Sebastian Scholz

accessing a variable at the same time.

Rust in Production
Gama Space with Sebastian Scholz

In fact, there's none.

Rust in Production
Gama Space with Sebastian Scholz

You need to do that yourself.