Re: Is Clojure's lack of support for forward referencing a feature or a bug?

2009-03-25 Thread Mark Engelberg
On Wed, Mar 11, 2009 at 5:18 PM, Timothy Pratley timothyprat...@gmail.com wrote: It is also quite trivial to patch the compiler to auto-def symbols as it finds them instead of throwing an error. I would be interested in knowing how to do such a patch. When I work on code, I like to organize

Re: Is Clojure's lack of support for forward referencing a feature or a bug?

2009-03-25 Thread Timothy Pratley
Hi Mark, A fuller discussion can be found here: http://groups.google.com/group/clojure/browse_thread/thread/a99b420d5ee0aa40/47f8c2ab6845e9ae Which has links to the simple patch I tried, and discusses the more advanced technique Laurent experimented with. Elena subsequently developed an emacs

Re: Is Clojure's lack of support for forward referencing a feature or a bug?

2009-03-25 Thread David Nolen
For what it's worth I'm a big fan of the wishful thinking programming style. I write some functions how I think they should look, declare the functions I haven't defined yet. Then I implement the lower level functions, write some tests- then usually the higher level stuff works without too much

Re: Is Clojure's lack of support for forward referencing a feature or a bug?

2009-03-25 Thread Timothy Pratley
:) I like that description! :) On Mar 26, 4:47 pm, David Nolen dnolen.li...@gmail.com wrote: For what it's worth I'm a big fan of the wishful thinking programming style. I write some functions how I think they should look, declare the functions I haven't defined yet. Then I implement the

Re: Is Clojure's lack of support for forward referencing a feature or a bug?

2009-03-11 Thread pmf
On Mar 11, 4:23 pm, quasar quasistellarli...@gmail.com wrote: It seems it makes Clojure source code to be in the order of lowest-to- highest abstraction. Naive mutual recursion based on top-level functions is impossible. I am curious, is it due to the current implementaiton of Reader or by

Re: Is Clojure's lack of support for forward referencing a feature or a bug?

2009-03-11 Thread Timothy Pratley
Clojure does support forward referencing (if I understand your question): user= (declare a) user= (defn b [x] (a x)) user= (defn a [x] (b x)) user= (a 4) java.lang.StackOverflowError Note: (declare a) is a synonym for (def a) which works also. It is also quite trivial to patch the compiler to