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 | 11373 reads
|
Browse archives
Active forum topics |
Recent comments
21 weeks 3 days ago
21 weeks 3 days ago
21 weeks 4 days ago
21 weeks 4 days ago
22 weeks 20 hours ago
22 weeks 20 hours ago
22 weeks 2 days ago
22 weeks 2 days ago
22 weeks 2 days ago
22 weeks 2 days ago