starteropk.blogg.se

Spotify app cover
Spotify app cover




spotify app cover spotify app cover

So, if you stick to the pure idea of OO you have to use getters and setters to access the current state of an object.įurthermore, another idea of OO is that you do not show any of your implementation details. C++ and Java implement "sending messages" as calling methods. If you start to separate the idea of OO and its implementation, then OO only knows about sending messages. They will tell you that everything which does not look the way they want it to be is wrong. However, OOP is constructed and designed by OO purist. This allows us to rethink a few things about what good code should look like. It is a multiparadigm language which also includes OOP. I think a lot of OOP people would be upset with me :)Ĭ++ is not an OO language.

spotify app cover

I only write Setters and nearly all member variables are public. In my personal projects, I never write Getters. I think I could not pass a variable as a reference or was it pass a variable as a pointerĪnd some parts of my code might be in inline assembly and in Java, you can’t use specific CPU features. I think there were some limitations I ran into. I use C++ but I do have some free functions. Personally, I am more of the procedural type of person. ( depending on the scale of the app ofc and the new class of IDE allowing true refactoring also helps.) In any case, if not misused they provide a way to handle sanity checks in one place and makes it far easier to have mockup objectsĪnd besides like in Qt it's a perfect place to call update when value changes.Īfter 30 years of also maintaining old code, i can say it's a mess waiting to happen to allow public access directly to the variables. Said in Is there an easy way to create getters and setters for ALL variables in a.






Spotify app cover