Hacker News new | past | comments | ask | show | jobs | submit login

Phil Bagwell's VList data structure seems really interesting as a way to avoid a bunch of the pitfalls of naive lists performance-wise - the paper's good fun and there seems to be an implementation in racket for anybody who wants to play with it.



The problem with a vlist is that it doesn’t maintain lisp list semantics. You can’t implement setcdr on a vlist. But you can with something like cdr-coding.


The paper discusses how to handle appends and similar.

Assuming the majority of your lists are read-only apart from appends, you can end up with something pretty performant overall.

Trade-offs all the way down as ever though.


Does any one have a copy of anything related to this?

Wikipedia had an article on it deleted, and I'm not getting much from the first few pages of google...


Racket implementation: https://docs.racket-lang.org/functional-data-structures/VLis...

There's a copy I made of the original paper here: http://trout.me.uk/lisp/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: