On Mon, Apr 11, 2011 at 4:12 AM, James Reeves <jree...@weavejester.com> wrote:
> On 11 April 2011 08:31, Ken Wesson <kwess...@gmail.com> wrote:
>>> So your not-int-in-range? function is a compound function, made up of
>>> four simple functions.
>>
>> So? This whole discussion arose because some of them have
>> preconditions, like at-least 1 not making sense for blank or
>> non-integer input.
>
> Yes, but remember that I said I was looking for non-compound
> solutions. In my view, simple functions are more idiomatic Clojure.

Mine were built up starting from very simple functions.

>> Is there anything that indicates they're more secure?
>
> I'd argue that encouraging people to think of what to allow is better
> than encouraging people to think of what to deny.

What is your basis for this?

>> If people are having a problem with the existing way, it's useful to
>> suggest alternative ways of looking at the problem. Here, for
>> instance, there was some difficulty regarding preconditions, and
>> generating the right error message when more than one thing failed
>> (e.g. it wasn't in the range 1 to 120 because it wasn't an integer at
>> all).
>>
>> I just thought it might be helpful to look at things from another
>> direction. Now we can all look at things from *both* directions.
>
> Sure, and I'm not saying there aren't clear advantages to having
> inverted validations.

Then why are you arguing as if you think I'm wrong about something?

> It's because your idea has merit that I'm taking the opposite side and
> arguing against it. If it turned out that I came to believe that the
> advantages to this approach outweighed any disadvantages, I'd
> whole-heartedly adopt the idea. For that reason, my current approach
> requires a vigorous defence.

Ah. Devil's advocacy, then, or something like it?

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