Category Archives: OOP

On the value of old principles

People using AI coding assistants typically wrestle with three problems (assuming they know what they’re trying to get the model to do, and that that’s the correct thing to try to get it to do): (It’s important to bear in … Continue reading

Posted in AI, design, OOP | Leave a comment

When did people favor composition over inheritance?

The phrase “favor composition over inheritance” has become one of those thought-terminating cliches in software design, and I always like to take a deeper look at those to understand where they come from and what ideas we’re missing if we … Continue reading

Posted in history, ooa/d, OOP | 3 Comments

Explicitly considering subtyping in inheritance

By far the post on this blog that gains the most long-term interest and attention is why inheritance never made any sense. In this post, I explain that there are three different ways to think about inheritance—ontological inheritance (this sort … Continue reading

Posted in OOP | Tagged | Leave a comment

The “return a command” trick This is a nice trick, but we need a phrase for that thing where you implement extreme late binding of functions by invoking an active function that selects the function you want based on its … Continue reading

Posted on by Graham | Leave a comment

An Imagined History of Object-Oriented Programming

Having looked at hopefully modern views on Object-Oriented analysis and design, it’s time to look at what happened to Object-Oriented Programming. This is an opinionated, ideologically-motivated history, that in no way reflects reality: a real history of OOP would require … Continue reading

Posted in OOP | Tagged | Leave a comment

Some programming languages have a final keyword, making types closed for extension and open for modification.

Posted on by Graham | Leave a comment

Runtime verification in Erlang by using contracts

About this paper Runtime verification in Erlang by using contracts, L.-A. Fredlund et al, presented at WFLP 2018. Notes Spoiler alert, but the conclusion to my book OOP the Easy Way is that we should have independently-running objects, like we … Continue reading

Posted in academia, OOP | Tagged | Leave a comment

Mach and Matchmaker: kernel and language support for object-oriented distributed systems

About this paper Mach and Matchmaker: kernel and language support for object-oriented distributed systems , Michael B. Jones and Richard F. Rashid, from the proceedings of OOPSLA ’86. Notes Yes, 1986 was a long time ago, but the topics of … Continue reading

Posted in academia, architecture of sorts, OOP | Tagged | Leave a comment

Research Watch, and Java by Contract

I introduced Java by Contract, a tool for building design-by-contract style invariants, preconditions and postconditions in Java using annotations. It’s MIT licensed, contributions are welcome, and I hope this helps lots of people to introduce stronger correctness checking into your … Continue reading

Posted in academia, Java, OOP | Leave a comment

Cleaner Code

Readers of OOP the easy way will be familiar with the distinction between object-oriented programming and procedural programming. You will have read, in that book, about how what we claim is OOP in the sentence “OOP has failed” is actually … Continue reading

Posted in OOP | Tagged | Leave a comment