Access modifiers are the bane of programming

Access modifiers are the bane of programming.

Attached: Public-Private-and-Protected-Member-Varialbles-in-a-C++-Class.png (294x346, 3K)

OOP is the bane of programming.

>m_foo
Why did this ever catch on?

because it's fucking braindead, you can infer that something is a member of an object without cancerous hungarian notation

>Not using an initialization list to initialize variables
OP is a faggot.

Bad programmers make enormous and obtuse classes where it isn't obvious which variables are members of the class.

You can already explicitly dereference this if you want to indicate that something is a member.

For you

Who needs any of that shit? Just use a closure lmao

oop isnt the problem its the people who over use it

That's a big program

for you

haha hehe le for you xD le bane XD

You have to be a special kind of retard to post like that

well perhaps he is wondering why someone would make a variable private, before making a setter for it.

Attached: baneface2.jpg (1920x1080, 69K)

Because cavemen use text editors that don't highlight members differently.

>Just use a closure lmao
or Clojure...

Attached: state.jpg (500x422, 55K)

4 U

>not using initializer syntax

you can just tell who learned java as their first language.

closure is trash desu

I would have a strong talk with whoever wrote that. The access permissions are chosen poorly. In general, avoid public member variables.

It's unnecessary outside of attempting to write object-oriented C where things like object membership isn't enforced by the compiler

This is true, but you forgot to mention that adding getters and setters is not a solution.

? Methods to control access to data is very much a solution and conforms to OOP. They expose nothing about the internal representation of the data (protip: nothing about getters and setters states that they're 1-to-1 with private fields) and can (and should) be designed to ensure that the object is always in a valid state.

This.

>t. just took first programming class
Access modifiers are among the easiest and most sensible things in OOP.