Recently I’ve found some cursed Rust code and decided to make a little joke/question on twitter. In the tweet I’ve presented some unusual code and asked “how could it compile?”. The solution was found quite fast by @Veykril (kudos to them!) and in this post I want to explain it in detail.
In this post I’ll talk about Rust’s
BTreeSet and tell a sad story about its methods.
I like writing comments. But at the same time comments kind of suck. In this post, I want to outline some ways we could improve this.
As always, I have some strong opinions on things I probably shouldn’t have opinions on. This time I want to tell you why I think
else chains are syntactically harmful.
References can be quite confusing, especially with different mutabilities. Indeed, only a third of people in my poll said that they understand what
&mut &[T] means!
As you may know, I have a (russian) telegram channel. One day I had a random thought about something I could make there. Now it became a tradition…
There is a function
Iterator::filter_map. I want to argue that it’s useless and Rust provides more powerful tools to replace it.
We all know that
null is a “billion-dollar mistake”, that it creates a lot of easy ways to make terrible mistakes. But it’s only so bad when it’s not checked by anyone and the compiler doesn’t force you to check it, right? Well, the title might be a spoiler, but let’s find out…