On Mon, Apr 5, 2010 at 8:24 PM, Michael Gardner <gardne...@gmail.com> wrote: > On Apr 5, 2010, at 7:49 AM, Sophie wrote: > >> Is this a Clojure restriction, or is it intrinsic to functional >> programming? > > It's a consequence of immutable data structures, which are an aspect of > functional programming. An immutable object can never be changed, and you > can't create multiple objects simultaneously, so you can't ever get a cycle > of direct references between immutable objects.
You can still have immutable cyclic structures with lazy evaluation. >> If my app is essentially about a user creating and editing a graph >> structure (sometimes via crud-level interactions, other times by >> somewhat larger refactorings), is either Clojure or functional not a >> good match? > > You can still do things functionally, with a level of indirection. I don't > see any problem with that approach, but whether it's a good match for your > project is up to you. I already mentioned this in my original response, but it's worth reiterating that the situation is very much like a relational database system. In a relational database there are no direct pointers, only primary keys. A primary key is nothing more than an identifier; it becomes a specific reference only in the context of a table. So despite initial appearances it's actually a very familiar programming model. -Per -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en To unsubscribe, reply using "remove me" as the subject.