13 ms·
(Author here) I explored an API like that, the problem I ran into was that often you don't want to refine all the way to a primitive; e.g. What is the value of
by dustingetz 12y ago
(Author here) I explored an API like that, the problem I ran into was that often you don't want to refine all the way to a primitive; e.g. What is the value of the whole record so I can validate it? Sometimes you want the record, sometimes you want the cursor.
- skrebbel 12y agoI noticed that you probably always want the value if the value is a leaf of the tree (typically a primitive value). Similarly, for validation, do you validate records of the values on the records? If the syntax to access the values via a record cursor or via a record is exactly the same, then you can just pass the cursor to the validation function, rather than the record. The validation function doesn't even need to know that it got a cursor. I'm curious whether you could shoot any holes in that reasoning.