So something that most (if not all) of us have seen and noticed is the different styles of access modifiers in C++, Java, and C#.
In C++ you do things like this:
Code:
class X
{
public:
int i, j, k;
string str;
double d1, d2, d3;
private:
int a, b, c;
float d, e, f;
protected:
char m, n, o, p;
}
Whereas in Java or C# it would look something along these lines:
Code:
class X
{
public int i, j, k;
public string str;
public double d1, d2, d3;
private a, b, c;
private float d, e, f;
protected char m, n, o, p;
}
Although this isn't the best example, I couldn't think of a better one off the fly.
Anyways, why do you think the programming community has shifted to a position where you have do declare everything as being "public", "private", etc. on each line instead of just declaring a section as "public" by using "public:" as you do in C++? Do you get what I am saying?
In C++ you say "public:" and from that point foreword everything is public until you either end the class or you declare some other access modifier such as private or protected.
In C#, however, you have to write "public" on every declaration that you want to be public...and it seems tedious and cumbersome. Why has the programming community shifted to doing it that way?