• panda_abyss@lemmy.ca
    link
    fedilink
    arrow-up
    27
    ·
    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
      16
      ·
      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.

      • Fiery@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        5
        ·
        5 months ago

        Not like C# is all that much better. So much garbage in the fundamentals just because it was done that way at the start and “they can’t change it now”. The best example is the IList interface.

        Theoretically this interface exposes both index-based access and collection-like modifications and as such would be perfect in a function if you need those two features on a type. In reality you can’t use it as a function parameter because half the official types implementing IList aren’t modifiable and throw a runtime error. E.g Arrays