Skip to main content
6 events
when toggle format what by license comment
Jul 27, 2018 at 17:31 comment added Flater @Tagor It makes more sense for the parent and the child to know about each other than it does for them to both magically contain the same value at all times.
Jul 27, 2018 at 13:20 comment added Tagor Thank you, that was a very insightful answer. What i meant by avoiding additional complexity was to have a solution that did not add more than constant complexity. But i see where you are coming from and should have been more clear. I'm going with the approach in your code sample, because as you guessed the caller is going to iterate over the children. Furthermore it does not add much in terms of code complexity comparing to the cashing approach. One thing is that it might be odd for the both the parent and the child to know about eachother, but i can certainly live with that. Thanks again.
Jul 27, 2018 at 11:06 vote accept Tagor
Jul 27, 2018 at 8:55 history edited Flater CC BY-SA 4.0
added 859 characters in body
Jul 27, 2018 at 8:50 history edited Flater CC BY-SA 4.0
added 859 characters in body
Jul 27, 2018 at 8:44 history answered Flater CC BY-SA 4.0