• 0 Posts
  • 3 Comments
Joined 1 month ago
cake
Cake day: August 16th, 2024

help-circle
  • It’s not easier to do getters or setters but especially in python there’s a big culture of just not having getters or setters and accessing object variables directly. Which makes code bases smaller.

    Same with the types (although most languages for instance doesn’t consider None a valid value for an int type) Javascript has sooo many dynamic options, but I don’t see people checking much.

    I think it boils down to, java has a lot of ceremony, which is designed to improve stability. I think this makes code bases more complex, and gives it the reputation it has.



  • houseofleft@slrpnk.nettoProgrammer Humor@programming.devLanguages
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    1 day ago

    I think a lot of it is “ceremony”, so it’s pretty common in java to:

    • create a get method for every object variable
    • create a set method for every object variable

    Then add on top that you have the increased code of type annotations PLUS the increased code of having to check if a value is null all the time because all types are nullable.

    None of that is hugely complicated compared to sone of the concepts in say Rust, but it does lead to a codebase with a lot more lines of code than you’d see in other similar languages.