Deconstruction patterns

Brian Goetz brian.goetz at oracle.com
Tue Mar 7 23:26:55 UTC 2023



> Please do one of two things: either change “constructor-deconstructor” 
> to “deconstructor-constructor” everywhere, or change 
> “embedding-projection” to “projection-embedding” everywhere.

Changing to d-c pair is preferable, because e-p pair is already (I 
believe) the more standard term of art?

> Another thing you could do in the “Digression” section is to avoid the 
> function-composition notation, which induces a similar reversal. You 
> don’t really make extensive use of the result anyway (such as by 
>  applying such a composition as a function in a formula). My advice 
> for a Java audience would be to use a pseudo-Java method notation:
>
> x.embed().project().equals(x)  should always be true
> x.project().embed().approx(x) should be true if nothing bad happens 
> during “project()”

Yes, or just f-then-g.

> Alos, I’m not sure exactly what you mean by a “complete partial 
> order”: Wikipedia notes that the term has three distinct meanings in 
> common use, and is also sometimes confused with “compete lattice”. 
> https://en.wikipedia.org/wiki/Complete_partial_order Furthermore it is 
> unclear how you indeed to use that partial order to define the notion 
> of approximate equivalence (which notorioiusly has difficulties 
> associated with lack of transitivity).

You're right that this should all go in a separate document where there 
is more room for the gory details.  These should be pretty easy changes 
to make.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-observers/attachments/20230307/0725a318/attachment.htm>


More information about the amber-spec-observers mailing list