News for hackers. Stuff that matters.
Re:Fundamentals of Garbage Collection by asplake on Saturday July 12, 2025 @03:55AM (#44540174)
Even with cyclic relationships between types, immutability makes cycles within instances difficult (without laziness anyway). A syntax tree would be a good example.
Re:Fundamentals of Garbage Collection by creata on Saturday July 12, 2025 @03:58AM (#44540192)
Yes, either is sufficient, I think.
Re:Fundamentals of Garbage Collection by xscott on Saturday July 12, 2025 @04:36AM (#44540354)
Yes, and the nice thing about doing it with immutability is you can still have recursive types to build linked lists, trees, and/or dags. From there you can build hash-array-mapped-tries, finger-trees, and so on, giving you friendly dict/list or JSON style data structures.