317
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 25 Nov 2025
317 points (100.0% liked)
Programmer Humor
27488 readers
1316 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
Access modifiers are definitely something I despise about OOP languages, though I understand that OOP's nature makes them necessary.
I don't think OOP's nature makes them necessary, so much so as it enables them and popular programming principles encourage them. I think they're a good thing, especially if there's a way around them in case you can't get the public interface changed and it doesn't work for you, especially for performance reasons, but that should be done with care.
Funny story, when modding Unity games using external modloaders you're writing C# code that references the game's assemblies. And with modding you often need to access something that the developers made private/protected/internal. Now, you can use reflection for that, but a different trick you can use is to publicize the game's assemblies for referencing in your code, and add an attribute to your assembly that tells the runtime to just... Let you ignore the access checks. And then you can just access everything as public.