The small language changes included in Project Coin / JSR 334 as part of JDK 7 / Java SE 7 have been easy to use and have worked well in practice. However, a few amendments could address the rough edges of those changes. In addition, using underscore ("_") as an identifier, which generates a warning as of Java SE 8, should be turned into an error in Java SE 9. It is also proposed that interfaces be allowed to have private methods.
Stephan van Hulst wrote:I don't know yet if interface methods are going to stay public by default.[/list]
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Stephan van Hulst wrote:I'm not sure if Oracle has the same policy regarding source compatibility.
Stephan van Hulst wrote:
You would now be able to do the following with try-with-resources and anonymous generic classes:
Stephan van Hulst wrote:
The underscore character was already disallowed as an identifier for lambda parameters. I assume this was because in some functional languages, the underscore character is used to indicate that you don't care about this parameter. The plan for Java 9 is to make a single underscore character a reserved keyword. I don't know yet for what purpose they might use it.
Stephan van Hulst wrote:
Since interfaces can have default implementations for public methods, it makes sense that you might want to break these methods up in smaller pieces. To avoid cluttering your API with helper methods, it's useful to allow private methods in interfaces. I don't know yet if interface methods are going to stay public by default.
Don't get me started about those stupid light bulbs. |