Michael Long
1 min readSep 15, 2024

--

Interesting analogy, but...

Specific cells also have specific receptors for specific messages, so one can in fact say a cell (object) has specific receptors (methods) used to trigger (execute) specific tasks. A cell's interface (API) is the net sum of all of the messages it understands.

Cells send messages out into the void, most of which are picked up by neighboring cells. In OPP, one needs a reference to an object in order to send it a message, said references enforcing locality.

Reactive programing builds on the idea of late binding, broadcasting messages to interested parties, but again, specific cell types know how to receive specific messages, and those interfaces don't change at runtime.

Completely missing from the analogy, of course, is the idea of methods returning results. And results, of course, are primarily the reason why we program in the first place.

Smalltalk and Objective-C probably came closest to truly dynamic, message passing programming... but modern systems are also concerned with performance and message passing by design takes more time and requires more work than languages that support statically displaced method calls.

And Swift enforces polymorphic behavior via protocols, which minimizes the need for inheritance as the primary interface-defining tool.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (1)