Hacker News new | ask | show | jobs
by alhimik45 635 days ago
>refcounting does the job since no cycles are possible by design

So double-linked list is impossible to define?

2 comments

You can't define new data structures as such in pure Tcl, as you don't have pointers. And as for cycles, you can't modify an object to add a reference to itself, since the copy-on-write will just create a new object.
Rosetta Code has examples of DBLs in Tcl and Tcl::OO.