Use (declare ...) to declare vars not yet defined (vars include fns).
You will be able to preserve the presentation order you want.

This will also make it clear which "implementation details" are
defined in the same source file versus stuff imported from another
name space.

Luc P.

On Sun, 17 Jul 2011 04:33:19 -0700 (PDT)
Jevgeni Holodkov <jevgeni.holod...@gmail.com> wrote:

> Hello,
> 
>   Usually, when I write a program, I tend to organize the function to
> keep with higher abstraction on the top and the details implementation
> in the end of the file like this:
> 
>  start() {
>    doGenericThing1();
>    doGenericThing2();
> }
> doGenericThing1() {
>   doSpecific();
> }
> doGenericThing2() {
> doSpecific()
>  }
> doSpecific() {..}
> 
> The idea is that when I open the file I want to see the most important
> stuff, not the implementation details. This is also a more natural way
> of reading the code. In Clojure, however, I am forced to place more
> specific functions on top of the file or I will get "Unable to resolve
> symbol". Yes, it is possible to overcome by using "declare" call on
> the top, but this requires manual work. Is there something more
> automated which I am not aware of?
> 
> Wbr,
> Jevgeni Holodkov
> 



-- 
Luc P.

================
The rabid Muppet

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