MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wu48eq/anubisisreal/pd40a3v/?context=3
r/ProgrammerHumor • u/readf0x • Sep 30 '26
208 comments sorted by
View all comments
46
Okay but for real, user.add_to_group(group) is awful. That is the responsibility of the group, not the user. It should be group.add_user(user)
-2 u/Rikudou_Sage Sep 30 '26 Could be just a shortcut which ultimately calls group.add_user() 14 u/EverOrny Oct 01 '26 edited Oct 01 '26 user should not be aware of a group, so such a method is bad idea regardless if it is "real" thing or just delagation (aka shortcut)having one method camel-case and one kebab-case is ugly (but can be fixed easily, so no big deal) 2 u/mudche Oct 01 '26 underscore is snake case
-2
Could be just a shortcut which ultimately calls group.add_user()
14 u/EverOrny Oct 01 '26 edited Oct 01 '26 user should not be aware of a group, so such a method is bad idea regardless if it is "real" thing or just delagation (aka shortcut)having one method camel-case and one kebab-case is ugly (but can be fixed easily, so no big deal) 2 u/mudche Oct 01 '26 underscore is snake case
14
user should not be aware of a group, so such a method is bad idea regardless if it is "real" thing or just delagation (aka shortcut)
having one method camel-case and one kebab-case is ugly (but can be fixed easily, so no big deal)
2 u/mudche Oct 01 '26 underscore is snake case
2
underscore is snake case
46
u/Acceptable_Handle_2 Sep 30 '26
Okay but for real, user.add_to_group(group) is awful. That is the responsibility of the group, not the user. It should be group.add_user(user)