> Java has a lack of this top-down processing, and it sometimes causes > problems because the order in which static initializers will execute > is not generally predictable.
If you're programming with a side-effect free functional approach, that shouldn't be a problem right? Or are you saying that you can have one static initializer be calculated off the value of another that hasn't been executed yet, and then blow up during compile? (I don't think C# lets you have any dependencies in static initializers; all those have to be expressed in a static constructor. I could be wrong.) > I prefer to define my terms (simpler functions) before I use > them (in more complex functions) anyway. It helps me organize my > thoughts and my design, too, as I need to think first about what > something will be built out of -- what are the basic data > representations and the fundamental operations on these? I tend to work from a different side. iteration 1: (display-winning-stocks) iteration 2: (display-stocks (pick-winning-stocks (analyze-stocks (download-stock-data)))) And then I'll flesh out each of those functions, creating more helper functions as I progressively break down the problem. iteration 3 - just the download-stock-data function (aggregate-results (download-from-urls (get-stock-urls (get-list-of-stocks)))) Having to "interrupt my flow" to add declares at the top, or just reorder the functions isn't quite what I'm looking for. It's entirely personal preference sure, but it's a significant obstacle hearing that, effectively "no, the language won't work the way you program best, and it's not going to change, so you might as well stick with what already works for you or look for something else." I know it sounds like a finicky, minor issue, but it is actually that important to me. It's not rejection to change, inasmuch as unwillingness to intentionally make my life harder. On Feb 23, 1:51 pm, Ken Wesson <kwess...@gmail.com> wrote: > Java has a lack of this top-down processing, and it sometimes causes > problems because the order in which static initializers will execute > is not generally predictable. > > I don't have any problems with Clojure files being processed from the > top down. I prefer to define my terms (simpler functions) before I use > them (in more complex functions) anyway. It helps me organize my > thoughts and my design, too, as I need to think first about what > something will be built out of -- what are the basic data > representations and the fundamental operations on these? If I think of > more later I can always scroll up and add them. -- 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