Comments (1)
Hi @FranklinChen, thanks for the comment!
I looked at Huey's paper and I am doubtful that there is an actual relationship to the zipper (or derivatives) here. AFAICT the idea behind the zipper is to walk an edit focus along a tree (or tree-like structure like a list for e.g. gap buffers) and close behind the zipper as you move along. The obvious analogy with the indirect pointer idea is that you take a different viewpoint as you move through the data structure, but it is my understanding that you need to explicitly implement "zippability" in the data structure if you want it (since it requires back-pointers to tree nodes, etc). This is not at all the case in the linked list example: the data structure is a vanilla linked list; the only change is to use an indirect pointer instead of a direct one.
So, in the best case (and with limited understanding of Huey's paper), that might be the least-effort implementation example of a zipper, but I'd rather not ask the reader to diverge into a realm of potential complexity that is not necessary to understand the idea behind Linus' "good taste" argument (which is why I wrote the article in the first place).
Hope this works for you and thanks again for the interesting sidetrack.
from linked-list-good-taste.
Related Issues (12)
- Will this result in memory leaks? HOT 2
- Crash HOT 1
- do you think it would be doable in other languages like python for a linked list? HOT 2
- About Linus taste HOT 1
- pointer vs value equality HOT 1
- I found out the **p can be removed, which leads to lesser codes, but I don't know whether it's better or worse since it introduces a warning, what do you think? HOT 2
- A question about the implementation HOT 3
- How did you make these diagrams? HOT 1
- Value of simplicity HOT 4
- Code fails on null or item not in list. HOT 4
- test doesn't compile on GCC HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linked-list-good-taste.