3 ms·
I like the idea. Seems really powerful and neat. But I can't escape the sense that in classic Lisp and Scheme the data is supposed to be transparent, and this n
by fusiongyro 14y ago
I like the idea. Seems really powerful and neat. But I can't escape the sense that in classic Lisp and Scheme the data is supposed to be transparent, and this notion of opaque, strongly-typed data came later. When you see all the supporting APIs in Common Lisp for plists and alists and whatnot, it seems to me that 'cons' was the abstraction.
- JoelMcCracken 14y agoTotally. And, I think that this was a problem, though. This is probably my least-favorite lisp feature. The fact that 'cons' was a fundamental abstraction is elegant, but I don't think it makes sense to model everything in terms of lists. Most lisps support different ways to construct data structures, though, and this is a manifestation of that.
- fusiongyro 14y agoIt doesn't make sense to model everything in terms of lists, but using 'cons' to make your own data structures doesn't force you to. A-lists and p-lists are both mappings that happen to use 'cons'. Are they efficient for thousands of entries? Absolutely not, but they work fine for a dozen, and you can certainly implement more efficient data structures on top of them. It's certainly true that modern Lisps have more structured approaches and this is a very cool improvement on those offerings. I just think "Scheme's approach to data is broken" is a little over the top.