Compares two approaches for removing objects from collections: direct removal methods versus retrieving the object first then calling remove. The retrieve-then-remove approach offers better object-oriented design through improved extensibility via decorators, more flexible error handling with null objects, and stronger encapsulation by keeping data wrapped within objects rather than exposing it as parameters.
Table of contents
Extending the Deletion BehaviorHandling Missing or Non-Deletable BooksDecoupling Retrieval and Deletion9 Comments
Sort: