Null object pattern: Difference between revisions

Content deleted Content added
mNo edit summary
Description: Unreferenced section
Line 29:
 
== Description ==
{{Unreferenced section|date=June 2023}}
 
Instead of using a [[null reference]] to convey absence of an object (for instance, a non-existent customer), one uses an object which implements the expected [[Interface_(computing)#In_object-oriented_languages | interface]], but whose method body is empty. The advantage of this approach over a working default implementation is that a null object is very predictable and has no side effects: it does ''nothing''.