[CM] metadata on vectors?

Iain Duncan iainduncanlists at gmail.com
Mon Jul 26 08:20:10 PDT 2021


Bill, I'm not saying it would be good to adopt as I'm no language expert,
but Clojure has an interesting metadata system that might be worth looking
at. I mention it only because I remember you asking last year what things
from Clojure were particularly nice.

iain

On Mon, Jul 26, 2021 at 3:16 AM Christos Vagias <chris.actondev at gmail.com>
wrote:

> Hi Gregg,
>
> Since you are using c objects already, I suppose you are also using the
> getters, ie (my-vector-element) which would return a scheme string.
>
> You could use a dilamda for the vector, and have a getter like (my-vector)
> to get all the elements, (my-vector 0) to get an element and (my vector
> 'meta) for your meta info.
>
> Another approach would be to openlet the dilamda and instead call (meta
> my-vector)
>
> On Mon, Jul 26, 2021, 11:21 AM <bil at ccrma.stanford.edu> wrote:
>
>> object->let is intended as a low-level portion of a
>> yet-to-be-written debugger.  Perhaps one simple
>> solution is to use (cons vector data) and pass
>> that around instead of the bare vector.  Most
>> scheme objects in s7 do not have an associated
>> let built-in.
>>
>> _______________________________________________
>> Cmdist mailing list
>> Cmdist at ccrma.stanford.edu
>> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
>>
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210726/4bb8cc03/attachment.html>


More information about the Cmdist mailing list