• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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