4 ms·
I think it was Steve Klabnik who said that it's basically the version of Rust with a garbage collector that people ask for. Might have been this episode of Oxid
by faitswulff 3y ago
I think it was Steve Klabnik who said that it's basically the version of Rust with a garbage collector that people ask for. Might have been this episode of Oxide and Friends: https://oxide.computer/podcasts/oxide-and-friends/1208089 https://oxide.computer/podcasts/oxide-and-friends/1208089
- steveklabnik 3y agoRust was originally described to me as “Rust and C have a baby,” so yeah I’ve been a fan of this kind of thinking for a long time.
- carlmr 3y agoRust is its own father? I think the borrow checker will make this difficult.
- riwsky 3y agoJust need support for recursive lifetimes
- still_grokking 3y agoSerious question: How would that work?
- steveklabnik 3y agoWhat do you mean by “that,” specifically? A bit hard to know what exactly you’re asking.
- still_grokking 3y agoRecursive lifetimes. The idea of the gp.
- steveklabnik 3y agoOh gosh, so I had seen your comment on mobile, and couldn't tell who you were replying to. I thought you were asking about "OCaml and C had a baby." I have no idea, maybe your original parent will elaborate :)
- riwsky 3y agoI don’t understand the confusion. It’s all right there, on page 404 of the rust spec: > Parameters with a recursive lifetime can only be used in a tail-call position within a function. If a function with only recursive params compiles successfully, it is guaranteed not to grow the stack. For the self-recursive case, people are likely better off just writing the imperative version. But using these with mutual recursive calls lets you build safely build state machines that compile down to the same performant code a classic goto-based implementation would in C.
- still_grokking 3y agoSounds reasonable.
- steveklabnik 3y agoLol, oops: I meant OCaml, if that wasn’t obvious.
- cpeterso 3y agoOCaml is quite literally a parent of Rust since the original Rust compiler was written in OCaml. (I know you know that; I'm just highlighting how apt the analogy was. :) https://github.com/rust-lang/rust/tree/ef75860a0a72f79f97216f8aaa5b388d98da6480/src/boot https://github.com/rust-lang/rust/tree/ef75860a0a72f79f97216...
- carlmr 3y agoIt was, but it was hard to resist commenting on the self-referential nature of it that Rust often has problems with.
- deleted 3y ago[deleted]
- evntdrvn 3y agoI joke with people that F# is “easy-button Rust”, so that also tracks lol
- deleted 3y ago[deleted]