Hi @gregoirejacquin,
I hope this has been updated and fixed in the updates to the book.
While thinking about this, here’s a few tips from me,
Not everything has an expiry date, so having expiry printed in the description is not a good idea.
Also you can play with the idea of using Protocols as behaviours, which include specific properties and functions to the items.
Thank you for the answer. But I think there is an error on the challenge text or an error on the code. Nothing naughty but I wanted to understand why. In that case food item not discountable.
Hi @gregoirejacquin,
Do you have the latest version of the book?
I think you are referring to the code, not the book. Yes the code has the protocol Taxable, not Discountable.
I guess one of the authors can get back to you on this as to why they did this or if it was a simple error.