• arendjr
    link
    fedilink
    arrow-up
    6
    ·
    25 days ago

    Would you have a link to that? I know there are many third-party garbage collectors for Rust, but if there’s something semi-official being proposed or prototyped I’d be most curious :)

      • nous
        link
        fedilink
        English
        arrow-up
        6
        ·
        25 days ago

        So someone that is not involved in rust at all and does not seem to like the language thinks it will get a GC at some point? That is not a very credible source for such a statement. Rust is very unlikely to see an official GC anytime soon if ever. There are zero signs it will ever get one. There was a lot of serious talk about it before 1.0 days - but never made it into the language. Similar to green threads which was a feature of the language pre 1.0 days but dropped before the 1.0 release. Rust really wants to have a no required runtime and leans heavy on the zero-cost abstractions for things. Which a GC would impose on the language.

        • solrize@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          24 days ago

          It sounds like he uses Rust and has some issues with it. IDK about green threads but Ada has had tasks (implemented in gnat with posix threads) from the beginning. If you pin a CPU core to a task and don’t use gc in it, that can handle your realtime stuff. Or these days, it’s becoming more common to use an fpga for cycle level timing control.

          Note that traditional Forth cooperative multitaskers used a few hundred bytes of code or even less. This stuff doesn’t have to be bloaty.

          Added: I’ve also seen a Boehm-style conservative GC in a few hundred lines of Forth. Using something like that in Rust could work nicely for lots of things.

          Anyway, you can have a soft realtime gc with pauses in the low milliseconds (Erlang has that). That’s OOMs lower than most internet ping times, so plenty fast enough for web servers. Which are all full of JS bloat now regardless.

          • nous
            link
            fedilink
            English
            arrow-up
            5
            ·
            edit-2
            24 days ago

            You could do a lot of things. Rust had a gc and it was removed so they have already explored this area and are very unlikely to do so again unless there is a big need for it that libraries cannot solve. Which I have not seen anyone that actually uses the language a lot see the need for.

            Not like how async was talked about - that required a lot if discussion and tests in libraries before it was added to the language. GC does not have anywhere near as many people pushing for it, the only noise I see is people on the outside thinking it would be nice with no details on how it might work in the language.