I wouldn't have expected either form to work actually; It's interesting 
that the first does. I would love someone else enlighten us on this, but my 
guess is that it's something not specified and that you shouldn't rely on.

If you want to have optional argument defaults depend on each other, I 
recommend using a separate let form as shown in my answer on stack overflow 
<http://stackoverflow.com/questions/3208347/how-to-create-default-value-for-function-argument-in-clojure>
 (I'm 
metasoarous).

Best

Chris


On Thursday, December 11, 2014 3:11:59 PM UTC-8, Michael Blume wrote:
>
> If I make my defaults on a :keys :or destructuring depend on the values of 
> other keys, I *can* get a compile-time error, depending on what order I 
> give the keys https://gist.github.com/MichaelBlume/4891dafdd31f0dcbc727
>
> Is this on-spec behavior? Should the former be allowed but not the latter? 
> Should both be allowed? Should neither?
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to