Hi NightCabbage Cabby,

Thanks for your inputs.

#4. In 99% of the time, the getter and setter are not used. It’s only on the 1% it is needed. For that 1% of the time, we force all our variables to have a separate function as getter and setter is overkill. Hence such a solution came in handy to make the 99% of the code better.

#5. Not sure which you mean. If you are asking if anyone using curly start and end in the same column, this is the old C++ approach. Check out.http://www.cplusplus.com/doc/tutorial/functions/. If you say curly bracket starts at the end of the function declaration, many are using that approach, e.g. https://docs.swift.org/swift-book/LanguageGuide/Functions.html, https://kotlinlang.org/docs/tutorials/kotlin-for-py/functions.html, https://www.w3schools.com/cpp/cpp_functions.asp, https://www.w3schools.com/java/java_methods.asp.

#6. Agree. Spaces are the default now, and the IDE auto-indent it for us.

# 7. I was that there as well, where at the end of every statement, my finger always type the semicolon automatically. When I don’t see it, I feel the pain. After a while, I realize it’s a state I got into as that’s where I started. It took some time to get over it.

I can understand why you feel that mess when you work on a language that doesn’t enforce them. As there are two groups of developers constantly doing it differently, some adhere to the old guide, some adhere to the new guides, and the worst is some is in between. The inconsistency makes it messy. Stick to one. If I made the call, I will say, use the newer way, consistently across all.

Glad you state that explicitly made getter and setter functions that does nothing other than get and set is silly. But that’s what one needs to do in C++ days, in the event they need to add more functionality when performing get and set of variable, they won’t need to change the accessor code of the variable outside the class. Hence #4 helps resolve that and got the best of both worlds.

Written by

Passionate about learning, and sharing mobile development and others https://twitter.com/elye_project https://www.facebook.com/elye.proj

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store