From the various online articles on Java 7 I have come to know that Java 7 will be having collection literals1 like the following:
List
They might have been inspired by the declarative programming style of JavaFX. If that is the case however, I'm disappointed that they didn't go all the way to support object literals as well. Here's an example of object literals in JavaFX:
Stage {
title: "Group-Nodes-Transformation"
scene: Scene {
width: 600
height: 600
content: Group {
content: [
Circle {
centerX: 300
centerY: 300
radius: 250
fill: Color.WHITE
stroke: Color.BLACK
},
Text {
x: 300
y: 300
content: "Mr. Duke"
},
ImageView {
image: Image {
url: "D:\\TEST\\Documents\\duke.png"
width:50
height:50
}
}
]
}
}
}
I think that this style of programming certainly lends itself to certain application areas. In the end it's always a matter of taste...