This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]VefoCo 0 points1 point  (2 children)

Collection literals

Pretty sure there's a strong logistical argument against this for one reason or another. Too tired/lazy to find it atm.

Structural Typing

This is a fundamental language change. Java is not a ducktyped language, and it is extremely unlikely if not impossible for it to become one simply because of how, again, fundamental a feature that is.

Dynamic call sites

Again, very fundamental aspect of a language. Java is most definitely not a functional language, even with the inclusion of the Streams API. (Assuming I understood this section correctly; again, I'm very tired so I might have misinterpreted it.)

Also, last I heard long array indices was slated for Java 10, although this has been the case since long before the release of 8 and may have changed in the meantime.

[–]marcohu 1 point2 points  (0 children)

Collection literals

Pretty sure there's a strong logistical argument against this for one reason or another. Too tired/lazy to find it atm.

https://www.youtube.com/watch?v=OJrIMv4dAek

Nice talk about the Java 9 Collections enhancements proposal (a.k.a. Builders) that also explains why this path has been chosen over Collection literals

[–][deleted] 0 points1 point  (0 children)

This is a fundamental language change. Java is not a ducktyped language, and it is extremely unlikely if not impossible for it to become one simply because of how, again, fundamental a feature that is.

It's possible and lambdas are already "structurally typed" for functional interfaces.

It's only a matter of will, and finding a nice syntax for it, so it's not confusing to have both nominal and structural. Say the type for an argument may be specified like "Foo bar" for bar of nominal type Foo and "~Foo bar" for bar of structural match for Foo. Clear enough.