Re: Cyclic require

2010-01-27 Thread Michael Wood
2010/1/27 Seth : > Michael, > > Thank you for pointing this out to me. After some thinking, I decided > to lump all the defprotocols in one file; having all the APIs in one > place seemed handy. But using (load) made it possible to keep deftype > in its own file... though I did have to resort to (u

Re: Cyclic require

2010-01-26 Thread Seth
Michael, Thank you for pointing this out to me. After some thinking, I decided to lump all the defprotocols in one file; having all the APIs in one place seemed handy. But using (load) made it possible to keep deftype in its own file... though I did have to resort to (use) since (in-ns) doesn't su

Re: Cyclic require

2010-01-25 Thread Seth
No support for cyclical dependencies is biting me too. I'm trying to use one .clj file per protocol&type, which doesn't seem *too* smelly. It's a habit that goes way back... maybe time to revise my worldview :-) If a namespace is intended to be a stratum then I will refactor to fit that. Fewer, la

Re: Cyclic require

2010-01-24 Thread Laurent PETIT
2010/1/24 Gabi : > As a side note, I didn't see anywhere in clojure docs that cyclic > references are forbidden. Yeah, and that's why I didn't employ (or intend to ?) the word "forbidden", but rather the words "smells" and "software principles". Smells and principles and general guidelines. Somet

Re: Cyclic require

2010-01-24 Thread Gabi
As a side note, I didn't see anywhere in clojure docs that cyclic references are forbidden. And if it is forbidden, the Exception raised by the runtime should reflect this instead of the odd "No such var->.." exception On Jan 24, 10:44 pm, Laurent PETIT wrote: > Some software principle are certai

Re: Cyclic require

2010-01-24 Thread Laurent PETIT
Some software principle are certainly above the languages used to solve a problem, even probably above programming paradigms (OOP, purely functional, etc.). Java certainly has good parts, and having promoted the role and importance of interfaces must certainly be accounted to its credit. But conc

Re: Cyclic require

2010-01-24 Thread Heinz N. Gies
On Jan 24, 2010, at 17:12 , Stuart Halloway wrote: > If the collaboration is deeply entwined, the two modules should be one > module. If one module uses another, but with occasional callbacks in the > other direction, use an interface or a protocol to define the backchannel. That sounds horribl

Re: Cyclic require

2010-01-24 Thread Stuart Halloway
a and be into a third namespace c * ... Maybe if you give more info concerning your particular case, ... HTH, -- Laurent 2010/1/24 Gabi : This thing is driving me nuts. If I do a cyclic require(ns-a requires ns-b and ns-b requires ns-a) I get exceptions complaining about "No such var->.

Re: Cyclic require

2010-01-24 Thread Gabi
cerning your particular case, ... > > HTH, > > -- > Laurent > > 2010/1/24 Gabi : > > > This thing is driving me nuts. If I do a cyclic require(ns-a requires > > ns-b and ns-b requires ns-a) I get exceptions complaining about "No > > such var-&g

Re: Cyclic require

2010-01-24 Thread Laurent PETIT
ou give more info concerning your particular case, ... HTH, -- Laurent 2010/1/24 Gabi : > This thing is driving me nuts. If I do a cyclic require(ns-a requires > ns-b and ns-b requires ns-a) I get exceptions complaining about "No > such var->.." > > How can cyclic depende

Cyclic require

2010-01-24 Thread Gabi
This thing is driving me nuts. If I do a cyclic require(ns-a requires ns-b and ns-b requires ns-a) I get exceptions complaining about "No such var->.." How can cyclic dependencies be done correctly in Clojure ? I know it might be bad practice. But I really need it. -- You received