News for hackers. Stuff that matters.
Re:My experience crafting an interpreter with Rust (2021) by mamcx on Saturday March 25, 2023 @10:19PM (#35310038)
I think a bigger one from what I have looked is the complexity of (en^de)code bytes around.

I suspect if you could use UNION better and be the same as Enum in Rust you could do us a favor! Also I wish I could do this easily:

    enum Tag {
        Int,
        Bool
    }

    enum Data {
        Int(Vec<i32>),
        Bool(Vec<bool>)
    }

    struct Val {
        tag:Tag,
        data:Data
    }

    let n = val.as_i32::<Tag::Int>(&self) -> Vec<i32>
Re:My experience crafting an interpreter with Rust (2021) by celeritascelery on Saturday March 25, 2023 @11:05PM (#35310368)
There are some crates that let you do that. For example enum-ptr

https://crates.io/crates/enum-ptr