← All posts tagged rust

Имеем исходник:
fn main() {
const SIZE: usize = 10000000;
let array: [u8; SIZE] = [0; SIZE];
$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/foo`
zsh: segmentation fault (core dumped) cargo run

Всё, что вам нужно знать о безопасности памяти раста.

Реддит как обычно доставляет:

Having conversed with the Rust community my conclusion is that it is a language for highly religious disgruntled C++ programmers who still insist that real men don't use garbage collection but end up resorting to reference counting everywhere because ownership is hard