User loginNavigation |
Short examples of complex use of state?Hi, I'm looking for some short algorithms that use state in tricky ways, where by "tricky" I mean: 1. State is used nonlinearly. That is, there should be multiple pointers to some of the state in the program. 2. The state should be "visible" to clients. Something like memoizing or caching is stateful and nonlinear, but it has no visible side-effects. 3. The state should have an indefinite lifetime -- that is, stack allocation isn't a sufficient memory management strategy. 4. Ideally, the state should be higher-order -- I'd like to see references of function (or object) types, so that there's a pointer to code. This is less critical than the others, but still nice. Any ideas? I've thought of union-find, and I would guess there are graph algorithms that have these properties, but I'm relatively ignorant about them. By neelk at 2005-05-27 15:55 | LtU Forum | previous forum topic | next forum topic | other blogs | 10492 reads
|
Browse archives
Active forum topics |
Recent comments
10 weeks 4 days ago
10 weeks 5 days ago
10 weeks 5 days ago
32 weeks 6 days ago
37 weeks 1 day ago
38 weeks 5 days ago
38 weeks 5 days ago
41 weeks 3 days ago
46 weeks 13 hours ago
46 weeks 15 hours ago