• labsin@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    I think they especially make sense for records so you can easily create shallow modifyable value semantic types with little boilerplate code.

    I do hate that all these features are yet more keywords and weird syntax. It’s becoming C##.

    Like the records are just sytesized methods on classes or structs. We already have this in the language with source generation. If something there was missing to create records, it would IMO make more sense to improve the source generation so the community also has access to the ecmxtensions. And the record could be split up in it’s separate features (copy constructor, defaul ToString imp, equatable) so we could choose to use part of it.

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

      Regarding your point about C##…

      It does seem like, in their effort to make the language less Java-y/enterprise-y, we now have multiple syntaxes for everything. I get the desire to maintain backwards compatibility but it does start to make the available range of syntax feel kind of messy.

    • Kissaki@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      29 days ago

      I do hate that all these features are yet more keywords and weird syntax. It’s becoming C##.

      It’s called sharp because you can cut yourself. /s