• panda_abyss@lemmy.ca
      link
      fedilink
      arrow-up
      25
      ·
      5 months ago

      Reminds me of java

      I have Toolkit toolkit = Toolkit.getDefaultToolkit(); seared into my brain. Then there were the bean factories…

      • Frezik@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        14
        ·
        5 months ago

        At least with Rust, there is a specific, defensible goal for why it does that.

        Java is just over designed. All of java.io reads like somebody’s Object Orientated Programming 101 final project, and they’d get a B- for it. Lots of things where you can see how they’re abstracting things, but there’s no thought at all in bringing it together in a tidy way.

    • shape_warrior_t@programming.dev
      link
      fedilink
      English
      arrow-up
      18
      ·
      5 months ago

      Even regular Rust code is more “exciting” than Python in this regard, since you have a choice between self, &self, and &mut self. And occasionally mut self, &'a self, and even self: Box<Self>. All of which offer different semantics depending on what exactly you’re trying to do.

      • dejected_warp_core@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        5 months ago

        I’ll add that 100% of the above is understood by the compiler. Unlike Python or JavaScript where you don’t know how bad you have it until the program is already running.

        • Lightfire228@pawb.social
          link
          fedilink
          arrow-up
          8
          ·
          5 months ago

          At least python has a decent runtime typing system

          JS’s type system feels like what you’d get by giving a monkey access to unlimited cocaine and a computer