Method reference double-colon syntax
Marc Petit-Huguenin
marc at petit-huguenin.org
Fri Jun 8 14:04:44 PDT 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 05/30/2012 07:43 PM, Brian Goetz wrote:
>> I checked. The compiler changes occurred in February but no justification
>> given. I am not looking to judge the justification; just wondering how
>> they justified :: that was better than #.
>
> There were a number of reasons. No one thinks :: is perfect, but # is
> worse, and there were many other alternatives explored that were rejected
> for various technical reasons. (Others may disagree with the conclusions
> or the reasons -- you have a right to -- but let's not dive down that
> rathole.)
>
> The prototype implementation used the following syntax for method
> references: Foo#bar. This made sense mostly because the lambda syntax used
> #, and secondarily (way distant second) that the Javadoc syntax for methods
> was Foo#bar.
For the record, there is another place where # is used to reference methods in
Java:
http://docs.oracle.com/javase/7/docs/api/javax/management/MBeanPermission.html
- --
Marc Petit-Huguenin
Email: marc at petit-huguenin.org
Blog: http://blog.marc.petit-huguenin.org
Profile: http://www.linkedin.com/in/petithug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAEBCAAGBQJP0mjnAAoJECnERZXWan7ERdMP/AhTlrQogY+Qp2iS2HMRfWvO
UONydVOAswyRJWCAh3SX73PZR0UrQxiSJ5LVJD4EA+Aqs36wkx61MNO1vCzszIQ8
qAb6BnQ+4sjwS9nbB6VIJFyBdgWB1P5Z4wZQwuOHn3fUoEyPBwTirUs8AcDjJg6l
FUEL+KKTYPLlWDpwKXBy5qhsXlIjk8m7fhKw3utna88IzHScY5h9c1APh0DTbTbu
0jjGmyjhfcZ3+OfKShE13k/E2tKoYRs6JXq0EwwCNTiC93zEICZ7UOvkSTnb0KwW
fLIXwvfky6emD1prcS90BFKTiyc/HwkxJtRHU/2j1tZwvLWM2hJVj4O+Qw/XSiDG
vxLr3NdwuLSORK0Utl+TrlAZQWB5kanwv7GsD5bY0lB/SKxZpdo2yQ69Q07XZMRF
j9ryBEXP4NHbjW75brusiQiuM46KqyBfuG3i3dzXmeE8dTf90nEz+4zea2mJcZmC
nosW/e+o9SrPeApi9d9/Co8Xc3qM7l/AHr44R5jJAIVWSUhby1XK/yQClD32S+tL
0/7viBdcL01qsS2qw/d2CzLdVV9gf/GyYdUxodXO9W+pUY3DdqZysnTkUd8+U9lg
glCFtHUyBhQnA4HFVFixzHdKca42/fitoK667Lwl6Sp6LBc6d9RvvMrxshezpweS
plqhr2SDp5htmjjJBEEq
=Q433
-----END PGP SIGNATURE-----
More information about the lambda-dev
mailing list