3 ms·
> null is what allows us to state things like: > Alice's birth date has not yet been entered in the database (alice.birth_date = null) Better solved with Mayb
by VMG 12y ago
> null is what allows us to state things like:
> Alice's birth date has not yet been entered in the database (alice.birth_date = null)
Better solved with Maybe (see other references in threads)
> No orders have yet been placed by this customer (customer.order_list = null)
Should be an empty list
> The operation succeeded without any errors (error = null)
The Either data type is a good solution here, because you can prevent accidentally operating on an invalid result if there was an error
> There is no more beer in the fridge (fridge.beer = null)
Should be 0 or an empty list