Comment

Comment by xscott

> Rust eliminates each of these points: all integer types have an explicit size, and all types are prefixed with either i or u for signed and unsigned respectively. There’s no bias towards a certain size or signedness.

Most of that paragraph is objectively false:

    fn main() {
        let i = 1;
        let j = 1;
        print!("i: {:?}\n", !i);
        print!("j: {:?}\n", !j);

        // spooky action at a distance
        let v = vec![1, 2, 3];
        v[i];
    }
Only a small percentage of rust programmers could explain what's going on here before compiling and running this program. I fully expect one of the more obnoxious ones to come along any second and defend it by throwing in a lot of unrelated information and not addressing the fact this is a confusing example despite being so simple.
parent xscott 3 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton