Todays news that there are likely to be language changes in JDK 7 was a bit of a surprise.
It seemed like the chance had passed.
Small language changed for JDK 7
Joe's post isn't very long, but it is clear.
- "I'll be leading up Sun's efforts" - so its supported by Sun
- "develop a set of ... language changes - so its more than one change
- "small language changes" - small means no closures or properties
- "we'll first be running a call for proposals" - community involvment
- "in JDK 7" - in the next version (but why does the blog not say Java 7?)
I've used this blog, and previous visits to JavaPolis (now Devoxx) to discuss possible language changes.
Some have been good ideas, others not so good.
The main point was to provide a place for discussion.
The next phase after that was to implement some of the language changes.
This has been achieved with the Kijaro project.
As far as I'm concerned, anyone can write up an idea for a Java language change, and then I'll provide
commit access at Kijaro for it to be implemented in javac - no questions asked.
So, before we all submit lots of crazy ideas and get carried away, lets remember that Sun provided some hints at JavaOne 2008.
includes the following as ruled out:
- Operator overloading (user defined)
- Dynamic typing
- Multiple dispatch / multi-methods
And the following as 'under consideration':
- Multi-catch in exceptions
- Rethrowing exceptions
The following are listed as 'long term areas of interest':
- Parallel algorithms
- Versioning of interfaces
- Extension methods
- Structural typing
- Pluggable literal syntaxes
So, there is already quite a wide list on the table.
Plus, there were other ideas suggested at last years JavaPolis, by both Josh and Neal:
- Variable declaration type inference (for generics)
- Enum comparisons
- Switch statement for strings
- Chained invocations, even when method returns void
In addition to all the above, I strongly suspect that there isn't going to be a chance to tackle
problems with generics. This is similar to closures and properties. There isn't the timesclae or manpower
to tackle these big issues in the timeframe being talked about (especially now Neal Gafter works for Microsoft).
Well, I'll mostly save those for another day.
But I would like to see a proper consideration of enhancements to help with null handling.
And enhancments to the for-each loop.
Finally, an appeal to Sun.
Many in the community are deeply sceptical of any language changes at this point.
The message should be simple - people need to feel that there is a clear means to vote or argue AGAINST
a proposal, just as much as to make suggestions FOR change.
Although I don't expect to make much use of the facility, I know there are many that do want to express this opinion.
This is a new departure for Sun in so openly asking for ideas from the community.
We need to respond and reply with thoughtful ideas for what will and will not work.