guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reader syntax for accessing arrays


From: Panicz Maciej Godek
Subject: Re: Reader syntax for accessing arrays
Date: Tue, 23 Aug 2011 20:03:40 +0200

> 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.

> 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)

Oh, that's a very good idea (at least for now).
Thanks!
M.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]