4

Dear Java, I don't care about your tight rules and patterns; I just want the data.

Do I want some values from some far, hidden-away objects? Oh no, I can't, because I must respect the OO contracts between those objects and interfaces and type safety and blah dee bla.

Comments
  • 1
    We had the same problem once, made some admittedly messy but otherwise effective "jython pipe" that consumes full Java objects and yelds simpler versions of the same Java objects, thus making the following Java contracts&code much easier.
    Python and Java don't have to be enemies.
  • 4
    Sooo gen Z
  • 0
    @netikras Sometimes Gen X gets tired of the same old things.
  • 1
    http://manifold.systems/

    Java has pretty powerful architecture.
  • 2
    If you're just hacking together something quick and throwaway for the data, why use Java in the first place?

    ...or if this is for a system that's going to last, quit whining and adhere to those contracts so you don't get tripped up later.
  • 1
    If you can rely on it, it should have a getter. If it doesn't have a getter and you don't know why, it's probably because you can't rely on it. (Or because the person who wrote the class wasn't very familiar with Java).
  • 1
    By the way, Java has a very old reflection system which should allow you to completely bypass visibility rules I think. Your coworkers will hate you for using it.
  • 0
    Tell us you prefer glow balls, without telling us you prefer glow balls. ;-)
  • 1
    @AlmondSauce This is DevRant, where people rant. It's for an existing, overly complex system for what it is. This complexity is not needed. It's written by lazy devs who put together spaghetticode.

    That's where my complaint was.
  • 1
    @lorentz Lots of reflection is used in this monster of a system.
  • 0
    but how else would you get it?
    isnt the only other way through singleton?
  • 1
    Reimplement the class from third-party package because the original is so stigmatized that even the most important data gets lost in `private`. Gonna love this! 😂
  • 0
Add Comment