From: Clark C . E. <cc...@cl...> - 2001-08-01 16:38:15
|
On Wed, Aug 01, 2001 at 12:04:29PM -0400, Joe Lapp wrote: | thought experiment convinced me that when all balances are told, the | gain of an incremental-only API over a random-access API is | negligible. Actually, your post here brings up the compromise that I currently have in the API. Each node has a "access" flag. The access flag can have three values to express how the content of a given node is made available. 0. Not Accessable -- Content has been read or is not yet provided. 1. Sequential Access -- Content may be read exactly once. 2. Random Access -- Content may be read more than once. Thus, the API is the same for both Random and Sequential Access... the only difference is that particular nodes can be tagged one way or the other. This brings up three classes of operations on a node: A. Operations which can operate at all levels, such as node_type() returns { map, list, scalar }. These operations have the following state transitions: { 0 -> 0, 1 -> 1, 2 -> 2 } B. Operations which can operate at Sequential or Random Access Level. This has two sub-types: B0. Those which cause the state transition {1 -> 0, 2 -> 2 } "Demoting" B2. Those which cause the state transition {1 -> 2. 2 -> 2 } "Promoting" C. Operations which require Random Access with the state transition { 2 -> 2 } | Random-access it should therefore be, even at in low level API. IMHO, it should be both. See yaml.h for details. | I also have ideas for how I could implement the sliding window more | effectively. I should give these a closer look to see whether I did | that right too. As with the API, I was never completely happy with | it. Maybe that's just the programmer's curse: a program isn't done | until you die. Since YAML is a graph, there is not a singular parent(). Thus I don't think the sliding window applies all that much... however, one should be able to always traverse up the current "navigation" path... indeed this will be required for cycle detection and resolution. Best, Clark ----- End forwarded message ----- |