New pattern matching doc
Brian Goetz
brian.goetz at oracle.com
Thu Jan 7 23:13:01 UTC 2021
> It's because i think we don't need to single out deconstructor from
> the rest of the other methods that can be called by a pattern.
I get why you think that, but I think that would be a serious mistake.
Constructors have a number of subtle differences from ordinary static
methods -- and it turns out it makes total sense for deconstruction
patterns to have those exact same differences compared to static "method
patterns."
In any case, I think you're (still) jumping ahead in the story (or
letting your own thoughts of how you want the story to end drag you off
course.) Can we stay focused on the topic of this document, which is
the role of patterns in the object model? I know you really want to get
on to the "what does the declaration of a method pattern look like"
part, but that's still a future conversation, and the syntax (ou
pres-de-syntax) issues are getting in the way of discussing the far more
important underlying concepts.
More information about the amber-spec-experts
mailing list