The irony is that the term "lock" is just a metaphor that produces a useful name. But, a lock in code does not model a real world lock. A lock is designed to restrict access to a resource to one process thread at a time. This is not modeling real world objects. This is organizing code by having a fixed interface and multiple different implementations. It's a code organization tool that allows code to be decoupled, not a tool for modeling real world objects. n/n
Object oriented programming is not what some people think. There are the old books and code examples that talk about modelling "real world objects". In practice, this isn't a strong OO pattern and doesn't lead to well constructed programs. OO is best a code organization tool. I'm reading an old OOP book that *says* you should model real world objects, but the first example is "locks" where you create a protocol for interacting with locks, and you can implement different types of locks.
1/n
The irony is that the term "lock" is just a metaphor that produces a useful name. But, a lock in code does not model a real world lock. A lock is designed to restrict access to a resource to one process thread at a time. This is not modeling real world objects. This is organizing code by having a fixed interface and multiple different implementations. It's a code organization tool that allows code to be decoupled, not a tool for modeling real world objects. n/n
The highest class of the LOOPS hierarchy is called Tofu, an acronym for "Top of the universe". The Lisp Object-Oriented Programming System (LOOPS) is the object extension of Interlisp.
The highest class of the LOOPS hierarchy is called Tofu, an acronym for "Top of the universe". The Lisp Object-Oriented Programming System (LOOPS) is the object extension of Interlisp.