On Tuesday, 13 August 2019 at 00:17:13 UTC, DanielG wrote:
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it,
If I'm understanding the problem correctly, it seems like you
have a choice
On Tuesday, 13 August 2019 at 12:22:45 UTC, Simen Kjærås wrote:
On Tuesday, 13 August 2019 at 08:41:02 UTC, Bert wrote:
On Tuesday, 13 August 2019 at 04:43:29 UTC, Paul Backus wrote:
It seems to me like the obvious solution is to use two
different classes, one to store the global state, and one
On Tuesday, 13 August 2019 at 08:41:02 UTC, Bert wrote:
On Tuesday, 13 August 2019 at 04:43:29 UTC, Paul Backus wrote:
It seems to me like the obvious solution is to use two
different classes, one to store the global state, and one to
store the individual objects in your structure. For example:
On Tuesday, 13 August 2019 at 04:43:29 UTC, Paul Backus wrote:
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
Making a field static is effectively a global variable to the
class.
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it, but
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
Making a field static is effectively a global variable to the
class.
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it, but this state
actually needs to be different for each tree object
On Tuesday, 13 August 2019 at 04:43:29 UTC, Paul Backus wrote:
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
Making a field static is effectively a global variable to the
class.
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it, but
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
Making a field static is effectively a global variable to the
class.
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it, but this state
actually needs to be different for each tree object
On Monday, 12 August 2019 at 22:48:43 UTC, Bert wrote:
I have a recursive class structure(think of a graph or tree)
and I need to keep a global state for it,
If I'm understanding the problem correctly, it seems like you
have a choice to make: either "bloat" the child nodes by the size
of a po
Making a field static is effectively a global variable to the
class.
I have a recursive class structure(think of a graph or tree) and
I need to keep a global state for it, but this state actually
needs to be different for each tree object. The reason for this
is that structurally it will not