A function is a function, whether it is bound to a Var or not. I think that was Ken's point, that you need to wrap a Java method in a function (anonymous or named) in order to pass to an HOF, as Java methods are not first class. So, that is one instance where a function whose sole purpose is to wrap a Java method may make sense.
On Mon, Jul 4, 2011 at 1:20 PM, James Keats <james.w.ke...@gmail.com> wrote: > > > On Jul 3, 6:15 am, Ken Wesson <kwess...@gmail.com> wrote: > > > > There's one obvious use case for such a wrapper function, though: if > > you'll want to pass the Java method to HOFs from time to time. You > > can't directly pass a Java method to a HOF, but you can pass such a > > wrapper function. > > > > Pardon me if I'm wrong, but could you not use an anonymous function in > those places where you'd need to pass it to a HOF and continue to use > it directly elsewhere? That would probably be how I'd prefer it, as > it'd mean less functions to keep track of, and less indirection > (decoupling api concerns aside). > > > -- > > Protege: What is this seething mass of parentheses?! > > Master: Your father's Lisp REPL. This is the language of a true > > hacker. Not as clumsy or random as C++; a language for a more > > civilized age. > > -- > 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 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