Wow, the discussion continued! I agree on what most people have said: AND-combined and none of the bindings available in the else.
On Friday, May 18, 2012 7:20:06 AM UTC+2, FrankS wrote: > > Christophe Grand was "experimenting" with some extensions to if-let and > when-let that had implicit ANDs for the let-forms: > > > https://github.com/cgrand/parsley/blob/master/src/net/cgrand/parsley/util.clj > > It feels intuitive to me to allow multiple if-let-forms like cgrand > implements, and I can certainly remember situations where I could have used > such a feature. > > -FrankS. > > > > On May 16, 2012, at 11:26 AM, dgrnbrg wrote: > > > I too assumed that if/when-let would support multiple bindings, short- > > circuiting if one failed, when I started learning Clojure. It seems > > that short-circuiting multiple bindings isn't surprising. > > > > On May 16, 10:56 am, Jay Fields <[email protected]> wrote: > >> I've also attempted to use if/when-let with multiple bindings in the > past. > >> I assumed that it would behave as 'AND' and that no bindings would be > >> available in 'else' > >> > >> Cheers, Jay > >> > >> > >> > >> > >> > >> > >> > >> On Wed, May 16, 2012 at 10:29 AM, Dan Cross <[email protected]> wrote: > >>> On Wed, May 16, 2012 at 9:16 AM, Aaron Cohen <[email protected]> > wrote: > >>>> On Wed, May 16, 2012 at 9:10 AM, Walter Tetzner < > >>> [email protected]> wrote: > >>>>> To make the bindings work like let, where later bindings can see > >>> previous > >>>>> bindings, I think the most natural way to do it is to have the > bindings > >>>>> behave like the maybe monad. > >>>>> [...] > >> > >>>> Saying something is obvious and then using the word monad a paragraph > >>> later > >>>> is contradictory. ;) > >> > >>> Hypothetically, "this is obvious, unlike most monads." Zing! > >> > >>>> What should happen on the else branch of the if-let; which bindings > are > >>> in > >>>> scope and what would be their values? > >> > >>> None of the bindings should be in scope. > >> > >>> - Dan C. > >> > >>> -- > >>> You received this message because you are subscribed to the Google > >>> Groups "Clojure" group. > >>> To post to this group, send email to [email protected] > >>> Note that posts from new members are moderated - please be patient > with > >>> your first post. > >>> 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 > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to [email protected] > > Note that posts from new members are moderated - please be patient with > your first post. > > 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 > > On Friday, May 18, 2012 7:20:06 AM UTC+2, FrankS wrote: > > Christophe Grand was "experimenting" with some extensions to if-let and > when-let that had implicit ANDs for the let-forms: > > > https://github.com/cgrand/parsley/blob/master/src/net/cgrand/parsley/util.clj > > It feels intuitive to me to allow multiple if-let-forms like cgrand > implements, and I can certainly remember situations where I could have used > such a feature. > > -FrankS. > > > > On May 16, 2012, at 11:26 AM, dgrnbrg wrote: > > > I too assumed that if/when-let would support multiple bindings, short- > > circuiting if one failed, when I started learning Clojure. It seems > > that short-circuiting multiple bindings isn't surprising. > > > > On May 16, 10:56 am, Jay Fields <[email protected]> wrote: > >> I've also attempted to use if/when-let with multiple bindings in the > past. > >> I assumed that it would behave as 'AND' and that no bindings would be > >> available in 'else' > >> > >> Cheers, Jay > >> > >> > >> > >> > >> > >> > >> > >> On Wed, May 16, 2012 at 10:29 AM, Dan Cross <[email protected]> wrote: > >>> On Wed, May 16, 2012 at 9:16 AM, Aaron Cohen <[email protected]> > wrote: > >>>> On Wed, May 16, 2012 at 9:10 AM, Walter Tetzner < > >>> [email protected]> wrote: > >>>>> To make the bindings work like let, where later bindings can see > >>> previous > >>>>> bindings, I think the most natural way to do it is to have the > bindings > >>>>> behave like the maybe monad. > >>>>> [...] > >> > >>>> Saying something is obvious and then using the word monad a paragraph > >>> later > >>>> is contradictory. ;) > >> > >>> Hypothetically, "this is obvious, unlike most monads." Zing! > >> > >>>> What should happen on the else branch of the if-let; which bindings > are > >>> in > >>>> scope and what would be their values? > >> > >>> None of the bindings should be in scope. > >> > >>> - Dan C. > >> > >>> -- > >>> You received this message because you are subscribed to the Google > >>> Groups "Clojure" group. > >>> To post to this group, send email to [email protected] > >>> Note that posts from new members are moderated - please be patient > with > >>> your first post. > >>> 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 > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to [email protected] > > Note that posts from new members are moderated - please be patient with > your first post. > > 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 > > On Friday, May 18, 2012 7:20:06 AM UTC+2, FrankS wrote: > > Christophe Grand was "experimenting" with some extensions to if-let and > when-let that had implicit ANDs for the let-forms: > > > https://github.com/cgrand/parsley/blob/master/src/net/cgrand/parsley/util.clj > > It feels intuitive to me to allow multiple if-let-forms like cgrand > implements, and I can certainly remember situations where I could have used > such a feature. > > -FrankS. > > > > On May 16, 2012, at 11:26 AM, dgrnbrg wrote: > > > I too assumed that if/when-let would support multiple bindings, short- > > circuiting if one failed, when I started learning Clojure. It seems > > that short-circuiting multiple bindings isn't surprising. > > > > On May 16, 10:56 am, Jay Fields <[email protected]> wrote: > >> I've also attempted to use if/when-let with multiple bindings in the > past. > >> I assumed that it would behave as 'AND' and that no bindings would be > >> available in 'else' > >> > >> Cheers, Jay > >> > >> > >> > >> > >> > >> > >> > >> On Wed, May 16, 2012 at 10:29 AM, Dan Cross <[email protected]> wrote: > >>> On Wed, May 16, 2012 at 9:16 AM, Aaron Cohen <[email protected]> > wrote: > >>>> On Wed, May 16, 2012 at 9:10 AM, Walter Tetzner < > >>> [email protected]> wrote: > >>>>> To make the bindings work like let, where later bindings can see > >>> previous > >>>>> bindings, I think the most natural way to do it is to have the > bindings > >>>>> behave like the maybe monad. > >>>>> [...] > >> > >>>> Saying something is obvious and then using the word monad a paragraph > >>> later > >>>> is contradictory. ;) > >> > >>> Hypothetically, "this is obvious, unlike most monads." Zing! > >> > >>>> What should happen on the else branch of the if-let; which bindings > are > >>> in > >>>> scope and what would be their values? > >> > >>> None of the bindings should be in scope. > >> > >>> - Dan C. > >> > >>> -- > >>> You received this message because you are subscribed to the Google > >>> Groups "Clojure" group. > >>> To post to this group, send email to [email protected] > >>> Note that posts from new members are moderated - please be patient > with > >>> your first post. > >>> 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 > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to [email protected] > > Note that posts from new members are moderated - please be patient with > your first post. > > 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 > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. 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
