Cactoos is a collection of object oriented (in Yegor Bugaenko understanding) primitives for Java. First I would like write about its pros and cons, but this is far from straightforward. So let’s look at a few points that I found interesting and important for understanding.
Implementation of the paradigm
OOP by Yegor Bugaenko is famous (very popular and criticized), especially in Java community. There are many good videos with detailed talks from Yegor on his view of OOP. But with all his speeches at conferences there is one problem — it seems that they are all about the same thing. Of course, there are two books about this. Unfortunately, they are not available to me and I can’t apreciate the presence of unique things in them. And people who already share his views, were waiting for some development of his ideas. But for a long time concrete implementation was absent. Yes, takes was existing, but I think it is not as revealing as we would like. Cactoos is exactly what we have been waiting for.
I admit, when I first saw this, I thought it was some kind of mistake or joke, because Yegor always spoke out against inheritance. But I found that it means the following: OOP by Yegor is not a religion, he adequately perceives reality and available tools. Only one problem with this: huge and complex constructors which generate many
@SuppressWarnings. It’s unclear how this affects the supportability of the code, for which he struggled. Discussion of this.
It easy to learn. Therefore, you can immediately begin to contribute to Cactoos and use it in your projects. For example, I created Cactoos-math. It extends Cactoos, and contains some math objects. This is achieved through brevity and clarity of classes. All interfaces this library contains one method. It’s obvious term
@FunctionalInterface is incorrect in the understanding of OOP, but that doesn’t mean we can’t use lambda for brevity of code. With the advent of Decarating Envelopes, many classes do not contain methods.
Instead of a Conclusion
Yes, Yegor changed the release date several times already. But I think Cactoos is enough for using his and you can always ask your questions on Stackoverflow with cactoos tag.
More about it: