anonymous method call

Marc Petit-Huguenin marc at petit-huguenin.org
Sat Jun 1 11:10:56 PDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Thanks Brian and Rémi for the response to my previous question.

Now that we established my lack of knowledge about the lambda type inference,
I have another question, but please note that it is not a suggestion for
improvement, merely a question about the limits of what would be possible.

A functional interface has only one abstract method, so is there any reason it
would not be possible to use an anonymous call to this method?

For example:

IntUnaryOperator operator = f -> f + 1;

and instead of

int i = operator.applyAsInt(1);

being able to do

int i = operator(1);


Thanks.

- -- 
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)

iQIcBAEBCAAGBQJRqjkuAAoJECnERZXWan7Ea4IP/056K859kyo58iLD3jBpQ2J5
SUgNE/JuBQpj8gBIia5p7iqOcEjjCYxolhTOYaZpuHfDe6/8H9R6YVpPNYOcTyVT
trYWwM33Kccoob1k4G31um4aYBbfjWJvBOhZVQvBcLAc2qxF65/lQGPWsrGqtOFo
85Pl2ZAuahGymb6p8GpfSr3gmbPiOCoofh8admgpJSIs80cDAo/E9b43fVr8JAKN
M2F8UsZbbzQ9M/mnL37cF5EKlRC4P5rMW0AnzUyYOAoTYRK/ypc4TULaYxuLlBZa
t38YdjjQIrUb9FPBrFDLkSfp+nq9fdb7ULUnMBluZTa3OWQ63wfKhum9VQETcS/R
h/gzMmMWxf+QF88w/tI0gkFlpgLL89n+OTs0QmByfJVWJbMGtQsfGbMqcOMxNFWh
4n+SLvuHX9fw/kvfsCXL9/QxiYcyWWdCZechu9MQpp9ciOrXm9HxVMIsq61HuiHb
yum/Id+17mWgIulTJxODVXm4Dga4gLs8A6eS8ZtXmyn+/6+EWL1q4wjbzrInTTLQ
CwP1gDQj3iv5iSg7682Ksahuj85z+oy9lTDEsmkOyk4ASQlohErM3P3ETaIYIjoC
wFrIq28g7kBeLZSlUdJL9hsBSYeBCy1+mgXo3R++uhjgYWK+vjg1tLnxKnCskAgk
xwHmjjuaDY3UOOtwVAmk
=jjhJ
-----END PGP SIGNATURE-----


More information about the lambda-dev mailing list