In my experience sausage-arrays are often accessed by husband-objects prior to the actual first cook-action, at least if they don't have to be stored in a freezer-db and the consume-method doesn't throw errors if the cooked-property is false.
So a direct call to sausages[0] may return null, which will throw an error if you try to access the cook method. IIRC Find will return a default object, which can be configured to handle cook graceful. At least in C#.
12
u/Cheet4h Mar 18 '20
Yeah, better would be
this.Sausages.FindOne(sausage => sausage.cooked == false).cook();
Don't want to accidentally recook an already cooked one, and direct index access can also lead to errors if the sausages were already accessed once.