On Apr 19, 4:06 pm, James Reeves <jree...@weavejester.com> wrote: > On 19 April 2012 19:46, Ambrose Bonnaire-Sergeant > > <abonnaireserge...@gmail.com> wrote: > > I've been doing some thinking about the treatment of nil in a > > statically typed version of Clojure. > > Statically typed in what way? Java's type system doesn't seem > particularly suited to a functional programming language like Clojure. > > - James
There's nothing about functional programming that precludes static typing. Haskell, say, does a lovely job of static typing without making you pound out a bunch of "keyboard typing" for every function like Java would. For example, the type signature for foldl (Haskell's reduce) is: (a -> b -> a) -> a -> [b] -> a "Reduce takes: - A function taking an A and a B and returning an A - An A to start with - A list of Bs And returns an A". This is sufficiently general for all applications of reduce, and if you don't feel like typing it out the compiler can infer it for you from the source. -- 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