The most annoying thing to me about forward declaration is that it prevents what Uncle Bob calls 'Newspaper Style Code' where I can structure my code in such a way that the high-level functions are right at the top and the primitives that they might need are found below so that I or someone else who needs to read me code can stop reading at any point and only miss some details about how things work.
I'm a big fan of this and it's one of the things I miss most about other languages when I'm in Clojure. Keepin a bunch of primitives in my head without seeing the big picture so that when I see the big picture it makes more sense is difficult and for whatever reason scrolling from the bottom of the file feels unnatrural enough that I still haven't gotten used to it. One advantage though is that the requiring forward declaration does gaurentee that if it compiles the code will not have a mixture of the two styles. On Mon, Aug 19, 2013 at 4:18 AM, John D. Hume <duelin.mark...@gmail.com> wrote: > > On Aug 19, 2013 5:53 AM, "Phillip Lord" <phillip.l...@newcastle.ac.uk> > wrote: >> >> That would be true, if I knew what my code was going to do when I >> started. But most of my code is used to investigate things that I don't >> understand; so it evolves slowly over time. I don't know when I start >> what "low-level" is going to be. So, I'm left with the task of removing >> forward declarations at the end. > > I don't think Stuart was suggesting that you start by writing low-level fns > at the top but that, as you extract or introduce low-level things to support > the idea you're working on, you put them above where you're working (instead > of just putting the forward declarations there). > > -- > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.