Hi,

Panicz Maciej Godek <godek.mac...@gmail.com> skribis:

>> Hi Maciej,
>> I've been thinking among the same lines. At the same time this syntax could
>> be used to access members of a 'struct' or 'class' object. It should be
>> relatively simple to write a small interpreter (or maybe a pre-compiler).
>
> I thought that maybe it could be achieved using the guile-reader by 
> Ludovic, but I don't know if this library is still supported by guile 
> (according
> to the savannah web site, "it requires guile 1.8.x", but git logs suggest that
> it should go with 1.9.x and 2.0.x as well). I am using 1.8 series, and I've
> had some trouble with compiling it with gnu lightning, so I didn't even
> manage to test it yet.

It roughly works with 2.0, but only with Latin-1 text.

>> Otherwise you could make a wrapper around the array in the form of a
>> closure. In that case, your example could be written
>> (*=! (a i j) 2)

You could even write macros for this.  I would actually find it more
elegant than additional syntax.

Thanks,
Ludo’.


Reply via email to