Even though I would avoid the Greek pizza on the menu, this is a lovely and well-structured article!
I have two concerns, which are out of the scope of this article of course, but I will mention them anyway. 😝
This switch statement will eventually become hard to maintain if the pizza is tasty and the business grows to add more entries to the menu. Additionally, I would consider throwing an exception in the default branch and removing the spinach from the Greek pizza as a good practice.
Thanks for your kind worlds, I would also avoid spinach on my pizza by the way :P ! Actually you have a valid point how switch statements tends to become hard to maintain.
Markos Korvesis
Even though I would avoid the Greek pizza on the menu, this is a lovely and well-structured article!
I have two concerns, which are out of the scope of this article of course, but I will mention them anyway. 😝
This switch statement will eventually become hard to maintain if the pizza is tasty and the business grows to add more entries to the menu. Additionally, I would consider throwing an exception in the default branch and removing the spinach from the Greek pizza as a good practice.
Good job, Theodoros Karropoulos!