Open hiiamboris opened 4 years ago
It would be good to see an example, how it should be used. Btw.. list!
datatype was removed from Rebol3
, because the internal structures were fragmenting memory. Wouldn't it be same with node!
?
One of the common usages would be simple tree traversal with foreach
(towards the leaves) or foreach/reverse
(towards the root). Here are some real code examples that become trivial one-liners: https://github.com/greggirwin/red-hof/blob/master/code-analysis/while/trees.md
because the internal structures were fragmenting memory
I wonder how is this different from just creating and collecting blocks. In any case if fragmentation is expected to be an issue, an implementation should chosen to prevent it.
IIRC, a bigger issue with list!
was that the interface/behavior differed from blocks in ways that made it harder to use correctly.
It's kind, could we imagine an auto ID for each node, edge (and new one in case of duplicate) Just to be able to associate any others "parameters" (tuples) onto each node edge by ref with this ID.
@JEROME-TICTEC A node is itself a unique ID (same as objects and series), because it has a unique memory address, so no need. At least if we consider that I don't see how a node could fit into a single cell, this means that it has data on the heap, and that data address is going to be unique.
Update: added implementation models descriptions
Read here: https://github.com/red/red/wiki/[PROP]-Node!-datatype