Timeline for Bread formula object
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Jul 17, 2022 at 10:37 | history | suggested | Glorfindel | CC BY-SA 4.0 |
broken link fixed, cf. https://meta.stackoverflow.com/a/406565/4751173
|
| Jul 17, 2022 at 8:00 | review | Suggested edits | |||
| S Jul 17, 2022 at 10:37 | |||||
| Apr 13, 2017 at 12:40 | history | edited | CommunityBot |
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
|
|
| Jan 9, 2013 at 19:54 | comment | added | Josh Anderson | I don't think you can make the object immutable based on my understanding of baker's percentages. Since you have to calculate the weight of non-flour ingredients based on the weight of the flour, and presuming this code is a way to do that, you'll need to be able to modify the ingredient weights based on changes to the flour weight. | |
| Jan 9, 2013 at 17:42 | comment | added | Jesse C. Slicer |
@mariosangiorgio you DON'T modify it. You pass in the weight (or lack thereof) during construction. Nullable doesn't mean necessarily it's going to need to change during the variable's lifetime. I read it as being fixed to either an actual weight or null (no weight needed) when an ingredient is constructed.
|
|
| Jan 9, 2013 at 16:48 | comment | added | mariosangiorgio | I agree that immutability is great, but I don't like that you left the nullable weight. How can you modify it if it is immutable? Are you going to create a new object? Check my answer for an alternate design | |
| Jan 9, 2013 at 16:39 | comment | added | Thomas | Thank you, Jesse. I need to read up on immutability before I understand what your changes mean. I might have questions in a bit. Thanks again. | |
| Jan 9, 2013 at 16:23 | history | answered | Jesse C. Slicer | CC BY-SA 3.0 |