Open gavinking opened 1 year ago
Why can't we have it for non-record types? Provided there is a single public constructor
Yes, sure, it would also be allowed for non-records. Sorry for being unclear.
Nothing to be sorry about @gavinking I presume the purpose of this repo is to discuss things to make sure things are clear and less behaviour is unspecified and vendor dependent
Another thing to consider as part of this is to just do certain sorts of implicit type conversions, for example, allow:
int count = em.createSelectionQuery("select count(this) from Book", int.class).getSingleResult();
which would currently throw because count(this)
is of type Long
.
I would like to propose that we let people write:
instead of forcing them into the extra ceremony of:
This isn't critical, of course, but it's a pretty easy simplification to the user experience.