“Oh, so we’re actually not friends” Walks away, as she should
Ohhh gottem!
She is now legally obligated to sex this man.
edit: programmers code
Normies hate this trick!
lmao ‘sex this man’. hahahhaha
Yup, that’d be the joke
Did I misunderstand something or is that an InCel-joke?
What’s the point of having friends when the whole point of private fields is to ensure that you don’t break other parts when changing those?
deleted by creator
Does C++ actually have something like that? That sounds like something made up for the joke?
It’s part of the language: https://en.wikipedia.org/wiki/Friend_class
Huh, do Java and other oop languages have them too and what are some good reasons to use them?
It allows for more fine grained access control and to implement afterthoughts.
Think having some private function that can break things if called improperly, but also allow you to avoid significant overhead when calling it the correct way. For example you could be avoiding input validation in a public wrapper for that function. If your friendly class already does it, or cannot produce invalid inputs, there is no need for that.
You could also implement logging after the fact, because your friendly logger object to read private members.
Arguably it’s a questionable design decision tho, as you could do all of this in other ways and it basically breaks any guarantees
private
would usually give you.That was a problem I saw with it but I guess it’s useful too. I like structs.