This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
[apologies, my internet access is limited and "pine" doesn't work, this email is from "/bin/mail"] jglascoe@jay.giss.nasa.gov writes: > On Sun, 8 Nov 1998, Maciej Stachowiak wrote: > > > (set! (vector-ref vector 0) "foo") > > > > That's the solution that Common Lisp takes essentially, and there is > > no ambiguity or vast potential for error here. > > no offense, but that's just plain ugly. > (vector-ref foo 2) ;; ERROR > (lookup foo 2) => "two" > > (vector? foo) => #f > (vector? (slot-value foo 'proxy)) => #t > <Maciej[D[D[D[D[D[Dever jovial Maciej says above is silly> [A[A[B[D[C[A[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[D[[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[[A[B[D[A[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[B[B[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C, I feel like I'm blind][B[B[B[B[B[B[B[B[B[B[B[B[B[B[B[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[A[B[A[A[A[A[A[A[A[A[A[B[B[B[B[B[B[B[B[B[B[B[B[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[A[D[Dvia[C[[C[B[B[B[B[B[B[B[B[B[B[B[B[B[B[B[B[B[B[B[B[B[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[A[Athe reason to do the 'proxy thing is that we can now write classes that inherit from "mop-vector" (or whatever it's called). E.g., a vector with indices m to n,[D[D[D[D[D[M[C[C[C[C[N[C[Ca vector allowing negative indices (a[-4] == a[len(a) - 4]), a simple-mided-[D[D[D[D[D[D[D[D[C["simple-minded-hash-table" class overriding lookup and retrieval by hashing the key first ("simple-minded-hash-table" is-a "mop-vector" and has-a "association-lists".[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[D[Dmop-alist"s[C[C[C[C). Jay jglascoe@jay.giss.nasa.gov