Win a copy of Terraform in Action this week in the Cloud 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Cactoos

 
Ranch Hand
Posts: 59
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic