[chuck-users] variables and memory

Kassen signal.automatique at gmail.com
Sat Mar 21 11:33:33 EDT 2009


> Thanks Kas, yes I use all these techniques, I think I will even try to
define the variables outside the class/function and pass it by reference if
I see that I have a problem so that memory is allocated only once. I think
actually that this might solve the problem. (I hope that it's not only
objects/arrays that you pass by reference in ChucK, I'll have to check the

I think most of our problems can be solved with this kind of technique, at
least practically speaking.

Still; I do think there are techniques that would be very worthwhile that
aren't being explored in ChucK right now because doing so would lead to
memory issues. For example recursion; we can use recursion (it's even used
in the examples) but we tend not to. For me part of the reason there is that
I fear the amount of garbage. For practical things I can re-write most
things linearly so it's no big deal but a recursive approach might be
extremely interesting on a compositional level.

I suspect having GC will open the door to new techniques that would be
impractical to explore right now.


That's interesting but are you sure that memory will actually be freed in
that case? I'm not so sure about that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20090321/d899af79/attachment.html>

More information about the chuck-users mailing list