On Tue, Sep 9, 2008 at 8:12 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On Sep 9, 10:51 am, "Brett Morgan" <[EMAIL PROTECTED]> wrote: >> Would you kindly educate me in how you believe that Clojure would go >> about trapping your error and giving you an error message instead of >> running out of stack space, given that you had given it a >> non-terminating dependency list? > > First please note that circular includes are nothing specific to > Clojure and other compilers have solved this problem multiple times > already.
For C, protection against circular dependencies is on the head of the programmer, in the form of #ifdef guards. For Java, circular dependency is not an issue, primarily because there is no macros, and thus an included file cannot be influenced by what is in the including file. Clojure has macros... > Second I am not insisting on a error message. As I said, the precise > semantics of require can be debated. For instance the ns macro can > always check a set of declared ns symbols before processing the ns > declaration further, putting a new ns symbol into this set as soon as > it is encountered. Wheather it silently stops then or issues an error > message is up to discussion. Also note that this is not a concrete > suggestion how to implement the ns macro, it should just illustrate > that this is not an instance of the halting problem. I think you will find it is, thanks to the presence of macros. > > > -- Brett Morgan http://brett.morgan.googlepages.com/ --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---