On Tue, Oct 28, 2008 at 2:49 PM, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Oct 28, 10:29 am, Stuart Sierra <[EMAIL PROTECTED]>
> wrote:
>> I feel like "econdp" would be less clear, since you don't know what
>> kind of exception should be thrown.  Plain old Exception? Or
>> RuntimeError?
>
> The kind of error is TBD, but it won't be random. It saves everyone a)
> redundantly having to specify this, and b) specifying needlessly
> different Exceptions and messages on no matching case. It's pretty
> useful in CL.
>
>>
>> > Finally there is the name, which has to follow the form and function.
>> > If we go with something like the last above, I like condp/econdp.
>>
>> I'm not sure about condp, only because Clojure hasn't used the CL-ish
>> "-p" suffix anywhere else.  Ideas: condfn, fcond, cond-apply, cond-
>> with, try-each,...
>
> This wouldn't match the use of trailing p in CL, which has been
> replaced by ? in Clojure. I like leading with cond so it sorts
> together to make people aware of the option. I don't think I like any
> of those better - whatever it is should be short.
>

I also like it leading with cond, so condp or condf, but econdp
doesn't fit, so condpe?  Having a general naming convention like
trailing F would be nice, I've needed that type of thing before -
assuming this can be generalized.  How about :error as the last clause
(test with no expr, or optional expression) instead of a different
macro?  Though :error could be a conflict if that was really one of
the tests, so maybe define clojure/error?  I disliked looking up so
many different macros for this in CL.  Also, would you want an error
variant or option for cond?

-Mike

--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to