Hi Brandon,

On 11 Feb., 19:59, Brenton <bashw...@gmail.com> wrote:
> Martin,
>
> It's very simple, I like it.
>
> There two things that stand out to me, both having to do with
> readabiliby.
>
> Instead of using (def score) you should use (declare score). declare
> exists for the purpose of making forward declarations. That one is
> black and white. You have to do it.

I can't remember if i looked that up somewhere or just tried it and it
worked. I guess
I was confused because the doc of declare speaks of vars not
functions. It wasn't
clear to me then that defn function creates a var too.

> The other I am not so sure about. You create a function named sum
> which calls (reduce + rolls). I think that an experienced Clojure
> programmer would rather just see
> (reduce + (take 2 rolls)) rather than (sum (take 2 rolls)). There are
> two reasons you may want to create the sum function. One bad and one
> not so bad. The first is that you think reduce + is confusing and so
> you are creating a name that makes more sense to you. The second is
> that you are going to be using it a lot and you want to save 5
> keystrokes. I have issue with the first reason.

I think i created the function to reduce duplication, but I see that
(reduce) is such
a common construct that my sum function may not be an improvement.

> I only point this out because I find myself doing this all the time.
>
> Brenton

Thanks for your feedback,
  Martin

-- 
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

Reply via email to