Re: Clojure and c++ and a bit more

2009-12-31 Thread nathaniel
I'm trying to think of scenarios where circular references would be a problem in Clojure. When does memory actually have to be allocated? Inside a let block, most often. When lexically scoped variables are passed to a function, their reference count increases as they are bound to its parameters,

Re: Clojure and c++ and a bit more

2009-12-31 Thread Mike Meyer
On Thu, 31 Dec 2009 13:01:35 -0800 (PST) nathaniel nathan...@photino.org wrote: BTW, does anyone know what kind of GC algorithms (reference counting or thread- based or what) are used by other Lisps? Reference-counting GC's in most LISPs are pretty much a thing of the past. Between needing to

Re: Clojure and c++ and a bit more

2009-12-28 Thread atucker
I see. Thanks, that makes a lot of sense. So just because this sort of multiple reference isn't explicit (or even visible) in Clojure, that doesn't mean it's not happening. Under the hood, a derived data structure is more than likely to share memory with its progenitor. And that's for very

Re: Clojure and c++ and a bit more

2009-12-25 Thread mac
On Dec 24, 6:14 pm, atucker agjf.tuc...@googlemail.com wrote: I am also curious about this.  Apologies, possibly naive question ahead :) My background is in C++.  By choosing to work with immutable values (i.e. with a lot of consts), I found that I was able to avoid most of explicit memory

Re: Clojure and c++ and a bit more

2009-12-24 Thread atucker
I am also curious about this. Apologies, possibly naive question ahead :) My background is in C++. By choosing to work with immutable values (i.e. with a lot of consts), I found that I was able to avoid most of explicit memory management, pointers etc. Exceptions were: (a) when interfacing

Re: Clojure and c++ and a bit more

2009-12-22 Thread mac
On Dec 21, 3:09 pm, pmf phil.fr...@gmx.de wrote: On Dec 20, 7:22 pm, nathaniel nathan...@photino.org wrote: Does anyone know of Clojure features which rely on Java features that would be prohibitively difficult to implement in C++? You might run into the problem than any C++ garbage

Re: Clojure and c++ and a bit more

2009-12-21 Thread pmf
On Dec 20, 7:22 pm, nathaniel nathan...@photino.org wrote: Does anyone know of Clojure features which rely on Java features that would be prohibitively difficult to implement in C++? You might run into the problem than any C++ garbage collector you find will probably not be quite as efficient

Clojure and c++ and a bit more

2009-12-20 Thread nathaniel
Hi: I've recently discovered Clojure and have loosely followed some of the discussions here. First of all, I think Clojure is a great language, since I also love Lisp, and I feel that the Java platform is the most robust for web development. But I perhaps come from a background a little