you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 8 months ago* (1 child)

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

  • source
  • hideshow 1 child comment
  • [–] 2 points 8 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.

  • source
  • parent