Hm, I see now.  Does Java work like that too?  (C# doesn't.)

Are there any plans for this to change in the future?  I can work with
it now, but it makes me uncomfortable.  It feels like a step
backwards.

I fully understand if it was just a feature put on hold, just to get
the reader/compiler out there.  If it was a design decision, then
that's kind of different.

On Feb 22, 6:40 pm, Daniel Bell <dchristianb...@gmail.com> wrote:
> This is true.  But you "declare" lets you throw out all the names you
> need to at the beginning to avoid circular definitions and the like.
>
> eg.
> (declare sum)
>
> (defn average [coll]
>   (/ (sum coll) (count coll)))
>
> (defn sum [coll]
>   (apply + coll))
>
> On Feb 21, 11:05 pm, Jonathan Mitchem <jmitc...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I'm new to Lisps in general, and very new to Clojure.
>
> > When I was trying out CL, I could put my "defun/defn"s in any order in
> > the file, and it would load and run fine in the REPL.  However, in
> > Clojure, it seems to be much more C/C++-like and I have to define
> > things before I use them in other defns.
>
> > Is this... correct?  Or is it just a limitation of the IDEs I've been
> > trying out?
>
> > E.g., it seems like I have to define "sum" before I can define
> > "average".

-- 
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

Reply via email to