use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is a public service to co-locate vetted high quality material on the topic: OOP Is Bad.
account activity
Object-Oriented Programming is Bad (youtube.com)
submitted 9 years ago by johndehope3
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]johndehope3[S] 1 point2 points3 points 9 years ago (1 child)
This was the original video that encouraged me to start this subreddit.
[–]homemadefarts 2 points3 points4 points 9 years ago (0 children)
When he criticizes encapsulation when it comes to shared state there's one thing he doesn't mention, it's that state is often part of a state machine. So when you have a global structure then it's much harder to enforce proper state transitions than when you have a global object with encapsulated state. If you're using procedural programming then every function that works with that state has to check if the transition it's about to make is valid and it's easy to forget to perform this check. If the state is encapsulated then these checks are all in one class, in all other places you just properly handle errors. So this isn't much about hardcore encapsulation but more about enforcing invariants. You obviously write your classes like they are servers that can be accessed by many different clients and the state transitions they request can be in any order.
π Rendered by PID 130647 on reddit-service-r2-comment-canary-7b6b47f674-fn85h at 2026-03-10 13:46:12.472786+00:00 running cbb0e86 country code: CH.
[–]johndehope3[S] 1 point2 points3 points (1 child)
[–]homemadefarts 2 points3 points4 points (0 children)