Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

November/2024
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
       

[ Archives News
for 'Java Technology' ]

home > news > java technology > chistmas gift

Chistmas Gift

Christmas holidays is one of my favourite moment in the year, I have time to see my relatives, read books, play with my kids and hack a little bit. Forewords I think I don't like the most in the strawman proposal is that the syntax for function type and for lambda literal reuse the same symbol '#'. It's something that I've observed when teaching C. The C syntax use * when you declare a pointer type and * when you want to dereference a pointer variable. The fact that * is used twice for different meanings introduces unnecessary confusion and is a burden to understand pointers. In my opinion, we should use a new keyword lambda to define lambda literal and use # for function type. #int(int) fun = lambda(int x) (x); But introducing a new keyword may break existing codes if by example lambda is used as a variable name, a type name, etc. So I decide to hack the javac parser to see if this syntax can be introduced without breaking all existing programs by considering lambda as a contextual keyword.   Defining a lambda with lambda So I've hacked the parser. And guess whar, it's possible to distinguish between a method call named lambda and a lambda literal because in the strawman proposal lambda statement starts with a curly brace ('{') and lambda expression starts with a left parenthesis ('('). So the hacked parser recognizes: A lambda...


Date: December, 27 2009
Url: http://www.java.net/blog/forax/archive/2009/12/27/chistmas-gift


Others News

©2002-2019Java-Virtual-Machine.net de | website design software | Free Bootstrap Template | easy free website builder | css menu maker