Prévia do material em texto
Muhammad Salem
Posted on 6 de ago. de 2024
Alan Kay's Vision of OOP
Alan Kay, the original conceptualizer of object-oriented programming, had a
significantly different perspective than the commonly understood definition.
He envisioned OOP as a message-passing system, where objects communicate by
sending and receiving messages. The core principles according to him were:
Messaging: Objects interact by sending and receiving messages.
Local retention: Each object manages its own data.
Protection and hiding of state-process: Encapsulation of data and behavior.
Extreme late-binding: Decisions about object behavior are deferred until
runtime.
Key difference: Kay's emphasis was on the dynamic and flexible nature of object
interactions, rather than the static structure often associated with OOP (like classes
and inheritance).
In essence, Alan Kay saw OOP as a way to model complex systems as a network of
communicating entities, much like biological systems. This perspective has influenced
the development of many modern programming languages and systems.
Would you like to delve deeper into any of these concepts or explore how they
differ from the traditional OOP understanding?
Extreme Late Binding: A Deep Dive
Extreme late binding means that decisions about which method to execute are
deferred until the program is actually running. This contrasts with early binding,
where these decisions are made at compile time.
Understanding with an Example:
Let's consider a simple example in C# involving polymorphism:
public abstract class Shape
{
06/08/2026, 10:38 Alan Kay's Vision of OOP - DEV Community
https://dev.to/muhammad_salem/alan-kays-vision-of-oop-k5h 1/6
https://dev.to/muhammad_salem
https://dev.to/muhammad_salem
https://dev.to/muhammad_salem
In this code, we have an abstract Shape class and two concrete implementations,
Circle and Rectangle .
Now, consider this code:
Here, the variable shape is declared as a Shape , but it actually holds a Circle object.
The crucial point is that the decision about which Area() method to call (the one in
Circle or Rectangle ) is not made until runtime, when the program executes the
shape.Area() line.
This is extreme late binding in action. The compiler doesn't know which specific
Area() method to call until it actually encounters the object at runtime.
Contrasting with Early Binding:
In contrast, early binding occurs when the compiler can determine the exact method
to call at compile time. For example:
Here, the compiler knows that circle is a Circle , so it can directly call the Area()
method of the Circle class.
Key points about extreme late binding:
public abstract double Area();
}
public class Circle : Shape
{
public double Radius { get; set; }
public override double Area() => Math.PI * Radius * Radius;
}
public class Rectangle : Shape
{
public double Width { get; set; }
public double Height { get; set; }
public override double Area() => Width * Height;
}
Shape shape = new Circle { Radius = 5 };
double area = shape.Area();
Circle circle = new Circle { Radius = 5 };
double area = circle.Area();
06/08/2026, 10:38 Alan Kay's Vision of OOP - DEV Community
https://dev.to/muhammad_salem/alan-kays-vision-of-oop-k5h 2/6
It provides maximum flexibility and adaptability.
It often relies on interfaces or abstract classes.
It's essential for dynamic languages like Smalltalk, but can also be used effectively
in statically typed languages like C#.
It can lead to more complex code if not used carefully.
## Benefits and Intent of Late Binding
Late binding, where decisions about which method to execute are deferred until
runtime, offers several advantages:
Benefits:
Flexibility: Systems can adapt to changing conditions without recompilation.
Extensibility: New functionalities can be added without modifying existing code.
Polymorphism: Enables objects to take on multiple forms, enhancing code
reusability.
Dynamic Behavior: Allows for more dynamic and flexible software systems.
Intent:
The primary intent of late binding is to create software systems that are:
Adaptable: Capable of responding to changes in the environment or
requirements.
Reusable: Promoting code reuse through polymorphic behavior.
Maintainable: Easier to modify and extend over time.
Dynamic: Able to exhibit behavior that changes at runtime.
Example:
Consider a plugin architecture. Plugins can be loaded and unloaded dynamically at
runtime. This flexibility is achieved through late binding, where the system
determines which plugin to use based on the specific situation at runtime.
In essence, late binding empowers software systems to be more responsive,
versatile, and future-proof.
Late Binding Example: A Plugin Architecture
Problem:
Imagine a photo editing software. You want to allow users to extend the software's
functionality by adding custom filters, effects, or tools.
06/08/2026, 10:38 Alan Kay's Vision of OOP - DEV Community
https://dev.to/muhammad_salem/alan-kays-vision-of-oop-k5h 3/6
Solution:
Use a plugin architecture with late binding.
Implementation:
1. Define an interface:
1. Create a plugin manager:
1. Create plugins: Different developers can create plugins implementing the
IFilter interface.
2. Load plugins at runtime: The software can load plugins dynamically at runtime,
adding new filters without modifying the core application.
How late binding works:
The PluginManager doesn't know the specific implementations of the filters at
compile time.
When calling ApplyFilters , the PluginManager iterates over the loaded plugins and
calls their Apply method.
public interface IFilter
{
Bitmap Apply(Bitmap image);
}
public class PluginManager
{
private List filters = new List();
public void LoadPlugin(IFilter filter)
{
filters.Add(filter);
}
public Bitmap ApplyFilters(Bitmap image)
{
foreach (var filter in filters)
{
image = filter.Apply(image);
}
return image;
}
}
06/08/2026, 10:38 Alan Kay's Vision of OOP - DEV Community
https://dev.to/muhammad_salem/alan-kays-vision-of-oop-k5h 4/6
Muhammad Salem
Full-stack software engineer.
LOCATION
Egypt.
EDUCATION
Bachelor's degree in Computer Science
JOINED
15 de dez. de 2023
Trending on DEV Community
Stratagems #22: The AI Chose Its Door. Lena Closed It.
ai discuss career programming
The actual filter logic is executed at runtime, based on the specific plugin loaded.
Benefits:
Extensibility: New filters can be added without modifying the core application.
Flexibility: Users can choose which filters to load based on their needs.
Modularity: The core application is decoupled from specific filters.
Key points:
The IFilter interface defines a contract between the plugin and the core
application.
The PluginManager acts as a mediator, handling plugin loading and execution.
Late binding allows the system to adapt to new plugins without recompilation.
This example demonstrates how late binding can be used to create flexible and
extensible software systems.
Code of Conduct Report abuse
Top comments (0)
•
# # # #
06/08/2026, 10:38 Alan Kay's Vision of OOP - DEV Community
https://dev.to/muhammad_salem/alan-kays-vision-of-oop-k5h 5/6
https://dev.to/muhammad_salem
https://dev.to/
https://dev.to/xulingfeng/stratagems-22-the-ai-chose-its-door-lena-closed-it-1mbe
https://dev.to/code-of-conduct
https://dev.to/report-abuse
Understanding Over Origin: The Missing Friction
ai programming productivity learning
Interviewing off leetcode you already memorized isn't cheating, it's the job
hiring interview career discuss
# # # #
# # # #
06/08/2026, 10:38 Alan Kay's Vision of OOP - DEV Community
https://dev.to/muhammad_salem/alan-kays-vision-of-oop-k5h 6/6
https://dev.to/adamthedeveloper/understanding-over-origin-the-missing-friction-55ag
https://dev.to/adioof/interviewing-off-leetcode-you-already-memorized-isnt-cheating-its-the-job-5e76