Alternative to the suffix .val and .ref in JEP 401: Primitive Objects

Anderson Vasconcelos Pires andvasp at gmail.com
Wed May 12 02:51:04 UTC 2021


Hi guys,

I saw Michael Kuhlmann's e-mail [1] where he quotes:

"The suffixes .ref and .val don't fit into our concept of class names, they
look ugly and can easily be mixed up."

I have no complaints about them. But I believe it would be better, *if
possible*, not to use them.

I believe it would be better to use the operator "?" instead of .ref.
because it can be used when the "null safety" feature comes to Java. :)

If it is necessary to represent the .val, the operator "!" could be a
possibility to help.

Probably this has already been discussed, but unfortunately is not so easy
to find out in the archives e-mail.

The maximum I found out was the e-mail [2] from Stephen Colebourne
scolebourne at joda.org where he mentioned the use of these symbols.

Just let me (maybe the community) at least know if the suffix is going to
be used because of a matter of preference or other reason.

[1]
https://mail.openjdk.java.net/pipermail/valhalla-dev/2021-April/008872.html
[2]
https://mail.openjdk.java.net/pipermail/valhalla-spec-comments/2016-April/000000.html

Kind regards,
Anderson.


More information about the valhalla-dev mailing list