• 0 Posts
  • 8 Comments
Joined 2 years ago
cake
Cake day: June 5th, 2023

help-circle



  • Access control and offering a sound interface.

    You don’t need getters and setters if every attribute is public, but you might want to make sure attributes are accessed in a specific way or a change to an object has to trigger something, or the change has to wait until the object is done with something. Java just has tools to enforce a user of your objects to access its attributes through the methods you designed for that. It’s a safeguard against unintended side effects, to only open up inner workings of a class as littles as necessary.

    In a language without something like private attributes you’d have to account for far more ways someone might mutate the state of objects created by your code, it opens you up to far more possible mistakes.





  • Best Love Letter version i have played so far.

    And it high jacked many board game nights, just because someone wanted to play “just another quick round”. The insanity mechanic really adds something.

    The only thing that sometimes annoys me is the high luck factor, but rounds are over so quick that a round lost to an unlucky insanity check or drawing cthulhu and the necronomicon at the same time is quickly forgotten.