This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Cactoos

 
Ranch Hand
Posts: 59
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a library called Cactoos which they've created based on some object-orientated principles:

  • No null
  • No code in constructors
  • No getters and setters
  • No mutable objects
  • No static methods, not even private ones
  • No instanceof, type casting, or reflection
  • No implementation inheritance
  • No public methods without @Override
  • No statements in test methods except assertThat


  • As an example, they sort a file like:



    They claim that their code is more object-orientated, but it doesn't seem better than alternatives like Guava to me. What do you think of the design of this? Some of the code they produce does look like they're heading towards a functional programming style so maybe they'd be better embracing that instead.
     
    I'm still in control here. LOOK at this tiny ad!
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!