Let’s recall what high-level languages are: these are languages that are symbolic, so not the ones and zeros underneath it all. They are that which provides handles for the human mind to pilot the Eva – in other words complete the task of serving a functional role in a complex society that you as an individual did not create. The way you do this is by learning symbols and how to manipulate these.
Like with all good creation myths, in the beginning, there were two high-level languages, Fortran and Pascal. These were procedural. What that means is that the program starts with a problem and then breaks that problem down into smaller sub-problems or sub-procedures.
Procedural language took a literal approach, working as a straightforward story composed of top-down instructions.
But a program inevitably has sections. Typically, programmers of old had to write task-specific code in separate procedures/functions, and invoked these procedures from one section of the program to another in order to perform various tasks. And the program’s data was generally shared among the procedures – there were no membranes enclosing different cells in the original primordial soup.
In the mid-1970s, the first object-oriented programming language, Smalltalk, was born from the sins of the procedural languages, enabling programmers to write code with a different approach. Whereas procedural languages were brutish in that they did not recycle code by attempting to enclose into concepts and dealt mainly with basic data types such as integers, real numbers, or single characters, Smalltalk provided the programmer with a new tool: classes and objects of those classes. Classes are simply concepts. Like ramen is a class containing the objects of noodles, broth, egg, bowl. If you had to tell the chef to place noodles, broth, and egg, into a bowl every time you walked into a ramen-ya instead of just telling them “give me ramen,” that would be annoying.
The class enables the programmer to encapsulate data, creating membranes. This is how spoken language itself works. A tribe in northern Namibia packages particular wavelengths of light this way:
Take a look at buru. For you, buru does not look like a single color. You speak a language that does not put a single membrane on those wavelengths. You instead have a class for each. Perhaps you call them green and blue. Once you see it one way it is short of impossible to see it the other. This is the same with language processing – their tribal language is gibberish, but these words on the screen are helplessly understood. That’s the power of classes.
A class defines a template/model, from which objects are created. Creating an object is called instantiation. Thus, objects are created/instantiated according to the design of the class. A class could represent something we imagine to be real such as a person. The class could have various attributes such as in the example of a “person” class: a name, an attractiveness rating, and an age. The class also provides code called methods. Methods allow the creator of the object to set and retrieve the values of the attributes – granting the power to christen the name as Lindsey, the rating as a solid ten, and to then to reveal this name and attractiveness rating when needed.
One big advantage to object-oriented programming is that well-written classes can be reused by new programs, thereby reducing future development time. (This is just in the same way that We reduce your development time by providing you with over five thousand five hundred revolutions around the sun head-start on the human soul packaged in language. This apex is then accessed through the internet and allows sufficiently maniacally self-motivated teens to ascend to heights of knowledge that would otherwise not be accessible even to those with genius-level IQ.)
In this noble endeavor of conserving negentropy through reusability, Smalltalk was somewhat successful, but had a major fault: its syntax was unlike any syntax already known by most programmers. Most programmers who knew C found themselves in a dilemma. They were attracted by the object-oriented features of Smalltalk but were reluctant to use it because its syntax was so different from C’s syntax. Humans are notoriously allergic to changes in syntax, even when a change in syntax might result in easier understanding of certain concepts.
C++ added object-oriented features to C, but also added complexity. Meanwhile, the Internet was swallowing mankind by the day. Web developers used HTML to develop webpages and rapidly had to incorporate programming features not only on the server side, but also directly on the client side. Fortunately, Java emanated from the void.