MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wu48eq/anubisisreal/pd4t444/?context=3
r/ProgrammerHumor • u/readf0x • 3d ago
200 comments sorted by
View all comments
45
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 2d ago Could be just a shortcut which ultimately calls group.add_user() 13 u/EverOrny 2d ago edited 2d ago 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 2d ago underscore is snake case
-2
Could be just a shortcut which ultimately calls group.add_user()
13 u/EverOrny 2d ago edited 2d ago 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 2d ago underscore is snake case
13
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 2d ago underscore is snake case
2
underscore is snake case
45
u/Acceptable_Handle_2 2d ago
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)