That's why you don't get paid. At least the pajeets make a few shekels slaving away in their Microshacks.
Wyatt Collins
Nothing
James Gomez
Low quality bait
Jeremiah Phillips
>all he ultimately ends doing is renaming getBall() to take(), or getWeight() to weight() For such strong initial statements I expected something less hilariously trivial as arguing about the name of the method.
Josiah Evans
because eclipse and intellij both autogenerate code that looks like that
Ryder Flores
the method names should just be name of the member you are trying to get x(), y(), etc.
Juan Young
he's right though, they're useful, but the class is cucking you
Charles Smith
This guy is fucking retarded and so are you. Getters have nothing to do with OOP, their point is bottlenecking access to data and to relieve the user from having to know how the data is manipulated until it gets to them
Anthony Turner
public class myClass() { public int x {get; private set;} public int y {get; private set;} public int z {get; private set;} public int d {get; private set;} public int e {get; private set;} public int f {get; private set;} public int g {get; private set;} public int h {get; private set;} }
>their point is bottlenecking access to data and to relieve the user from having to know how the data is manipulated until it gets to them
99% of access methods I see at work are literally just encapsulated private member variables.
Jordan Allen
tl;dr: >let's pretend object-oriented paradigm can and should reflect physical world >you can't "set" a ball to a real dog, you see >therefore, dog.setBall() and dog.getBall() are bad >dog.take() and dog.give() are good, and totally not still a getter and a setter
Pic related is the guy's painting. Unsurprisingly, turns out he's a literal cuck.
Getters and setters are there BECAUSE they work with pajeets and code gets split up because of managers. Chances are, the person you're working with will screw up your variables and possibly break your logic. Getters/setters protect you from bad programmers
It lets you allow read access to a variable and disallow write access. It also makes for an easy place to put a breakpoint to see what all is messing with a variable.
Isaiah Smith
Java!
public class MyClass { @Getter private int x; @Getter private int y; @Getter private int z; @Getter private int d; @Getter private int e; @Getter private int f; @Getter private int g; @Getter private int h; }