please for the love of gosling give us reasonable data structure literals nobody cares about this stuff i just want to be able to create a map or list w/o ceremony please
mapOf("a" to 1, "b" to 2)
...where "to" is actually an infix extension function that creates a Pair object, so there is no special syntax for maps.In all seriousness, this is grade school BS.
(a) Literals are a syntax improvement. Much more serious languages than Java have them.
(b) What Python and JS have don't amount to "simple lists and maps". They have the full gamut (including constructor based instantiation of different types).
(c) Literals don't have to be a single ("simple" or not) type. They can be whatever, and in Java these could include different classes of lists and maps initialized with the same literal syntax based on the assigned variable's type.
(d) When Oracle gives literals, Java programmers not familiar with them in other languages will suddenly love them too, and they'd not just be "for Python and Javascript" anymore.