[cl-containers-devel] Using CL-Containers

Greg Pfeil pfeil at amazon.com
Fri Dec 16 01:24:51 UTC 2005


So, as of today, I'm successfully using CL-Containers at work. Huzzah!

A few things I've noticed:

1. I couldn't find an easy way to get an element count for a container.

2. I couldn't find an intuitive way to reverse a list. My solution was:

    (make-container 'list-container
                    :initial-contents prev-cont)

which reverses the list for me. I would have assumed that :initial-contents
maintains the same order, but that's not the case.

3. I think I misunderstand the way item-at works. I figured that with an
ASSOCIATIVE-CONTAINER, I could access nested hashes like:

    (item-at container "Config" "server" "port") => 80

But what happens is:

    (item-at container "Config" "---" "---") => #<ASSOCIATIVE-CONTAINER ...>

basically ignoring any keys after the first. Requiring something like:

    (item-at (item-at (item-at container "Config") "server") "port") => 80

Overall, I'm pretty happy with the library, but was hoping that these things
could be addressed. Am I looking for the wrong thing? Is this
not-yet-implemented functionality?

Thanks a lot for this. I'm re-writing a lot of code to use CL-Containers
now.

Oh, one other thing ... Will the new Moptilities require a new
CL-Containers, or is the interface basically unchanged?





More information about the cl-containers-devel mailing list