Hello Christian,

2009/3/16 Christian Vest Hansen <karmazi...@gmail.com>

>
> On Mon, Mar 16, 2009 at 9:26 PM, Elena <egarr...@gmail.com> wrote:
> >
> > On 16 Mar, 20:58, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> >
> >> For files, that would be "wait until the end of the file before
> complaining
> >> for undefined symbols, and let me arrange the defs in any order I feel
> most
> >> readable without having to think about placing those (declare) calls".
> >
> > I second your proposal.
>
> Otherwise, for the purpose of bringing a counter argument, I find that
> functions naturally group together by their level of abstraction, with
> the lowest level of abstraction at the top and the highest at the
> bottom.
>
> Considering this, I will boldly claim it usually is not that difficult
> to put these groups in their own lib. We could, perhaps, consider it a
> sign (for avoiding the word "smell") that a new lib should be defined?
> Then, as now, we can let "declare" handle the cases where this isn't
> true.


I agree that it's not difficult. But, at least in my own experience, it's
not the second step to cleaning up my programs.

I generally try to get code that works, even if in a not really good looking
shape. Then I refactor if it is really ugly-looking, or when I see the
possibility to factorize between several functions.

So I end up with more general functions, but still, I'm not sure if they
deserve their own lib. And maybe they're just general enough for the purpose
of the functions of my current file.

It's in a third time, when I want to share code between several namespaces,
that libraries in their own namespace show up.

So I think there's room for what I suggested, because the step to seperate
functions into libs by a criteria of level of abstraction does not appear
that fast in my programming cycle.


>
>
> > >
> >
>
>
>
> --
> Venlig hilsen / Kind regards,
> Christian Vest Hansen.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to