• danA
    link
    fedilink
    arrow-up
    12
    ·
    7 months ago

    The main issue I have with them for classes is that there’s no way to mark the parameters as readonly.

    • marlowe221@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 months ago

      I think that’s one of the reasons I like primary constructors - when you see one, it’s a signal that there’s nothing “special” happening with the parameters.

      On the other hand… there are like 7 different ways to do constructors at this point (exaggerating a little…) and it’s a lot to keep track of.