• Flipper
    link
    fedilink
    arrow-up
    13
    ·
    edit-2
    1 month ago

    Goal is to keep the std to the absolute minimum. It’s a lot easier to change a normal library and switch over, than to change std. Just ask the c++ guys about their regex support.

    That’s the reason rand, regex, num, chrono etc. aren’t part of the std.

    • TehPers@beehaw.org
      link
      fedilink
      English
      arrow-up
      8
      ·
      1 month ago

      Or look at Python and their urllib, urllib2, new urllib, and the requests package on PyPi.

      We already sort of saw this in Rust with crossbeam and standard channels, until of course they replaced the standard lib implementation with crossbeam’s implementation.

      • nous@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        30 days ago

        Yeah, std can never break backwards compatibility. So any big thing that gets added needs to be sure it wont ever change. Something like tokio is far too large for that and already does not fit all use cases.

        What I want to see is more support for interop between the different run times by providing standard interfaces for things between the various runtimes. For instance being able to spawn a task in for the runtime to take care of. You cannot do that without knowing which runtime you are using ATM. Which is highly anoying for developing libraries that need to do this. And that is only one of the many problems that could be solved in the std lib without needing to bring in the whole runtime - just create common interfaces we can use that can be implemented by each runtime,