4 ms·
> In that sense, functions are on equal footing with values. But function objects are not on equal footing with non-function objects. You can nest function obj
by chimeracoder 14y ago
> In that sense, functions are on equal footing with values.
But function objects are not on equal footing with non-function objects. You can nest function objects or non-function objects inside other function/non-function objects, but at the root, you need an object that isn't a function.
At the end of the day, yes, you can do the same things, but my original point was that this doesn't make Scala functional: it makes Scala object-oriented (Java, by contrast, is not properly object-oriented, because it has four kinds that aren't objects).