Basically, would you rather want everything in a class/module/struct/whatever to be inaccessible by anything else unless you give a keyword saying it’s public (like Rust) or have everything accessible unless you make it private (like Ruby and Crystal)? Why?

Also, what do you think of languages that make you write public or private for every member, or ones that inherit the default state from whatever the parent member is?

  • @pancake
    link
    22 years ago

    Everything public wouldn’t be a problem for readability I believe, as I give variables really verbose names. It would be slightly harder to write good code, but still. Everything private would force me to go full OOP and it would be better 80% of the time, but the other 20% would make me want to die a lot.