OOP is Not What You Think It Is

OOP is Not What You Think It Is
Object-Oriented Programming (OOP) has become one of the most popular paradigms in modern software development, yet it’s often misunderstood. When most people hear “OOP,” they think of classes, inheritance, and the rigid hierarchy of objects—features that languages like C++ and Java have made standard. But this wasn’t the original vision.

The roots of OOP lie in the groundbreaking work of Alan Kay, who introduced the world to the concept in the 1970s through the creation of Smalltalk. For Kay, OOP wasn’t about objects in the way we think of them today—it was about message passing, a way for software components to communicate seamlessly without getting bogged down by the internal structure. In this vision, objects were secondary to the messages they exchanged, which encouraged flexibility, modularity, and dynamic behavior.

Smalltalk: A Different Kind of OOP
Smalltalk wasn’t just a programming language—it was a philosophy. Unlike C++ and other modern OOP languages that focus on complex class hierarchies, Smalltalk treated objects as living entities capable of sending and receiving messages. This idea of message passing was central, allowing objects to respond in ways that weren’t strictly predefined. The focus was on behavior over structure, encouraging experimentation and evolution within a system.

Smalltalk’s version of OOP was lightweight, adaptable, and far less rigid than what we see today. Alan Kay’s emphasis was on how objects collaborate rather than how they inherit from one another. This made systems designed in Smalltalk inherently more flexible, allowing for changes without the fear of breaking the underlying architecture—a stark contrast to the tightly coupled systems often seen in C++-based projects.

What Went Wrong: The Rise of Modern OOP
As languages like C++ gained popularity, the industry’s perception of OOP began to shift. Object-Oriented Programming became synonymous with class-based design, encapsulation, and inheritance. Message passing was sidelined in favor of method invocation, where functions are called directly on objects, leading to more rigid and complex systems.

The shift from Smalltalk’s dynamic message-passing model to the static class structures of C++ marked a fundamental change in how we build software. It wasn’t long before terms like polymorphism, encapsulation, and inheritance became the buzzwords of OOP, but the simplicity and elegance of Kay’s original ideas were lost in the process. Modern OOP became more about managing structure than about fostering communication between entities.

Programming Languages: Loved, Loathed, and Long-Standing

The world of programming languages is vast and ever-evolving. Over the decades, many languages have been introduced, gained popularity, and sometimes faded into obscurity. Yet, some languages, despite being widely criticized, have managed to maintain a strong foothold in the industry. Conversely, others, once heralded as the future, have declined in use. This article delves into this phenomenon, examining why some languages are resilient despite criticism, while others have fallen out of favor. We will explore these dynamics globally, understanding regional preferences and the historical context that has shaped the programming landscape.

Implementing Regular Expressions (RegEx) from Scratch in Python

Implementing Regular Expressions (RegEx) from scratch in Python provides a deeper understanding of how RegEx works. This tutorial guides you step-by-step through creating a RegEx engine using finite automata, covering essential RegEx operations, converting RegEx to NFA using Thompson’s Algorithm, and building a full-featured RegEx engine.

Learning Lua Step-By-Step: (Part 24)

This entry is part 23 of 25 in the series Learning Lua Step-By-Step

In this final installment of our series, we’ll delve into Lua developer best practices. These practices encompass various aspects such as code readability, documentation, adherence to standards, version control, testing, asset management, useful tools, techniques, traits of professional developers, and the Zen of Lua.

Learning Lua Step-By-Step: (Part 23)

This entry is part 22 of 25 in the series Learning Lua Step-By-Step

Dive into Lua’s OS library functionalities covering date/time formatting, file path manipulation, time-based delays, and more. Explore examples demonstrating how to interact with the operating system efficiently, enhancing your Lua programming capabilities.

Learning Lua Step-By-Step: (Part 22)

This entry is part 21 of 25 in the series Learning Lua Step-By-Step

Delve into Lua’s powerful math library, exploring functions for arithmetic, trigonometry, exponentiation, random number generation, and more. Learn through practical examples such as three-body simulations and planetary simulations, enhancing your Lua programming skills.

Learning Lua Step-By-Step: (Part 21)

This entry is part 20 of 25 in the series Learning Lua Step-By-Step

Discover the rich functionalities offered by Lua’s standard libraries, covering error handling, file input/output, environment manipulation, metatables, iterators, serialization, and more. Explore practical examples and exercises to enhance your Lua programming skills.

Learning Lua Step-By-Step: (Part 20) Memory Management

This entry is part 19 of 25 in the series Learning Lua Step-By-Step

Dive into Lua’s automatic memory management system and understand how garbage collection ensures efficient memory usage. Learn about controlling garbage collection, memory optimization techniques, and the impact on Lua objects.

Learning Lua Step-By-Step (Part 18)

This entry is part 17 of 25 in the series Learning Lua Step-By-Step

Lua metatables are a powerful feature that allows developers to customize the behavior of tables in Lua. This article explores metatables in-depth, covering their syntax, functionality, and practical applications. Learn how metatables enable operator overloading, custom indexing, and much more, making Lua programming more flexible and expressive.

Learning Lua Step-By-Step (Part 15)

This entry is part 14 of 25 in the series Learning Lua Step-By-Step

Dive into the world of web programming with Lua! In this series of articles, learn how to set up your development environment, create a simple multi-page web application using the Lapis framework, and enhance it with dynamic content and user authentication. Explore the possibilities of building powerful web apps with Lua.