Re:Advantages of Functional Programming in Java 8
by ajuc on Wednesday September 07, 2016 @04:00AM
(#12441546)
> Such naming is an anti-pattern, of course
This is exactly the cultural problem with too strict adherance to OOP :)
It's like people saying "nails are anti-pattern of course, but people still use them, so we've added hammer-heads to our screwdrivers".
Re:Advantages of Functional Programming in Java 8
by scott_s on Wednesday September 07, 2016 @10:11AM
(#12443509)
Yes, that was the point I was getting at. It's obviously part of how real Java code is written, but I feel like I'm going against how the language was designed when I do it. (Clearly, everything is not an object, and a class is not always the most appropriate way to group code.)
Such functional namespaces were part of Java from the very beginning (Math is a good example and with release of Java 8 now there are many more in standard library). I have not seen an enterprise project yet, in which there's no something ending with Utils or Helper, that is just a collection of functions. Such naming is an anti-pattern, of course, but still, almost every developer in Java world uses this and has it part of it's development culture.