guile-user
[Top][All Lists]
Advanced

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

Re: References/locations


From: Clinton Ebadi
Subject: Re: References/locations
Date: Fri, 15 Aug 2008 09:55:45 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

"Maciek Godek" <address@hidden> writes:

> I've been thinking of implementing this "location" stuff
> as a smob, but you've got the point that it is (probably)
> impossible to implement the location system without
> redefining set! and define.

You may want to read a few documents on functional programming to see
why your locations concept is not good. There are a number of
additional issues as well: one that comes to mind is the interaction
of the garbage collector with pointers into the middle of a vector.

What is so wrong with forms like `(set! (vector-ref foo index) ...)'?
It's generally bad practice to go around destructively modifying data
structures anyway.

-- 
Corinne: this is why we should have designated bath buddies
Corinne: to get places you cant reach because youre slippery and in
         case you get a lil tooo slippery and crack your head open
         someone can call the coast guard and save you




reply via email to

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