A few months back (at the start of this blog) I was thinking about interesting things you can find in C++, then I realized one thing: the keyword clas

[History of C++] Explanation on why the keyword `class` has no more reason to exist

submited by
Style Pass
2021-09-17 16:00:12

A few months back (at the start of this blog) I was thinking about interesting things you can find in C++, then I realized one thing: the keyword class doesn’t really have a good reason to exists!

Anyway, studying the reason for the word class to exist lead me to look into the history of the language. It was very interesting and I really enjoyed it.

So I decided to write a mini-series of articles about the history of C++ aiming to present concepts that may be outdated today, in C++20, and explain why some strange or debatable things were made that way in the past.

First, Sibling Rivalry: C and C++ and A History of C++: 1979-1991 are both fully available on Stroustrup’s website (just follow the links).

Second, I find it quite sad that I could only find sources from one author. Sure, Bjarne Stroustrup is probably the best individual to talk about his own work, but I would have like the insight of other authors (if you know any, please tell me in the comments).

There is one and only one difference between class and struct: by default, the members and the inheritance of struct are public, but in those of class are private.

Leave a Comment