News for hackers. Stuff that matters.
Re:Friendship ended with the garbage collector by alpaca128 on Friday August 27, 2021 @03:29AM (#28325245)
> not being able to implement certain patterns in safe code (e.g. linked lists)

This may be correct for doubly linked lists in the classical implementation, but I've never needed one outside of programming exercises. Trees can be safely implemented in at least 2 ways. Rust is limiting, but usually more in terms of approach, not possibilities. As long as the program isn't interacting with the "unsafe" outside environment it's usually no problem avoiding unsafe blocks completely.

Re:Friendship ended with the garbage collector by tick_tock_tick on Friday August 27, 2021 @03:38AM (#28325286)
ehh depends on what you're actually coding one job intrusive doubly-linked list were everywhere and very appropriate while my current job never touch them at all.
Re:Friendship ended with the garbage collector by arethuza on Friday August 27, 2021 @03:54AM (#28325352)
I believe the Linux kernel has its own implementation of doubly-linked lists:

https://0xax.gitbooks.io/linux-insides/content/DataStructure...

Edit: Not that I know much about the Linux kernel, but I do remember it being used as a counter example when someone stated before that nobody uses doubly-linked lists.

Re:Friendship ended with the garbage collector by zozbot234 on Friday August 27, 2021 @05:04AM (#28325690)
Rust developers are exploring new safe ownership patterns (such as 'QCell' and 'GhostCell') that should make it feasible to implement double linked lists without unsafety. Not very simple, though: these solutions do come with an inherent tradeoff wrt. lack of modularity.