you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 1 month ago (3 children)

A language feature is not needed because macros exist.

I would even argue that perhaps the most important role macros play is blocking adding endless language features 😉

  • source
  • parent
  • hideshow 3 child comments
  • [–] [S] 2 points 1 month ago (2 children)

    Macros are often not very ergonomical to use compared to language features.

    Also, why anonymous product types but not anonymous sum types? It seems kind of weird to me. Anonymous sum types can be just as useful as anonymous product types, as the blog post illustrates quite well I think.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago

    The language wouldn't have lost much without tuples actually. But they do at least have direct pattern destructuring utility. Anonymous enums don't.

    They also don't pose potential future awkwardness if/when variant types become a thing.

  • source
  • parent
  • [–] 2 points 1 month ago*

    While I agree with you that anonymous sum types are useful, the language designers tend to avoid anything that might include a hidden cost (in this case either the size of the enum or cost of boxing). Something along those lines might end up in the language eventually, though.

  • source
  • parent