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 | 9822 reads
|
Browse archivesActive forum topics |
Recent comments
6 weeks 6 days ago
7 weeks 1 day ago
7 weeks 2 days ago
14 weeks 2 days ago
20 weeks 15 hours ago
20 weeks 1 day ago
21 weeks 16 hours ago
23 weeks 6 days ago
25 weeks 1 day ago
25 weeks 2 days ago