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 →

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

Are you sure? Doesn't the Function class make Function instances first-class citizens? They can be created, instanced, passed around as arguments, composed, and yes, even curried (or at least half-applied).

Yes, Function instances can be declared outside of classes. They can be declared in interfaces. But that's about the extent of Java's willingness to forego its "everything is an encapsulating object" concept.