logoalt Hacker News

echelontoday at 3:27 AM2 repliesview on HN

Folks have little appreciation for how soon we're all about to transition to something new.

I don't know what that entails, but something is going to happen.

I got into a discussion with some Rust compiler folks yesterday. I called Rust the "final human language we'll serialize our thoughts to": it's easy to write for LLMs, is super type safe, ergonomic, easy for humans to read and reason about, and has really nice deploy characteristics - single binary, no GC, bare metal, etc. If Python and Rust are equivalently easy to emit, you'll probably choose Rust if you're not bound to other choices.

People quipped back that this was absurd and that Rust is built for decades of future human use, that this kind of talk would put people off of Rust, and that they need to think of the future.

As if anything will be human in the coming decades.

Programming languages were punch cards.


Replies

lelanthrantoday at 6:30 AM

> I called Rust the "final human language we'll serialize our thoughts to": it's easy to write for LLMs, is super type safe, ergonomic, easy for humans to read and reason about, and has really nice deploy characteristics - single binary, no GC, bare metal, etc.

I think it will go the other way - what use is a language with the poor ergonomics of Rust if humans aren't in the loop?

9rxtoday at 4:43 AM

> super type safe

Maybe if you're willing to write insanity like this:

    struct Zero;
    struct Succ<N>(N);

    trait Add<Rhs> {
        type Output;
    }

    impl<M> Add<M> for Zero {
        type Output = M;
    }

    impl<N, M> Add<M> for Succ<N> 
    where 
        N: Add<M> 
    {
        type Output = Succ<<N as Add<M>>::Output>;
    }
But even then it doesn't really work all that well for any practical use and you'll quickly hit a bunch of other roadblocks if you were to actually try to use it. You're pushing Rust to go well beyond what it is designed for. If we're being honest, in the real world you're going to write something like this instead:

    fn add(a: u32, b: u32) -> u32 {
        a + b
    }
But then you give up the type safety. So it's not really a type safe language in any meaningful sense. Certainly not compared to languages that are designed to be actually type safe. If your only point of comparison is Javascript, then sure, Rust looks pretty super type safe in comparison to that, but in the grand scheme of things it's not type safe.

If it is just as easy to emit a language that is type safe, why Rust?