rplevy / swiss-arrows

a collection of arrow macros
565 stars 23 forks source link

Remove special quote handling from -<> #1

Closed S11001001 closed 12 years ago

S11001001 commented 12 years ago

Disclaimer: I've used -<> without quote handling for a long time, so this may just be resistance to change. However:

The quote special case seems weird. It's like, "we'll put the form in the list/map/whatever, unless the CAR is the symbol "quote", in which case we'll do it to the CADR instead.

But more importantly, whereas the base <> behavior is (empirically!) quite intuitive, what happens for quote is not. Notwithstanding Bruce's First Law of Lisp:

#_1 (-<> (blah) '(a <> b))
#_2 (-<> (blah) '<>)

In form 1, according to the README, (blah) is not evalled. I wouldn't care to guess that. Of course, that is also the case for form 2 without quote handling; however, the simpler rule for list scanning yields that conclusion as well.

rplevy commented 12 years ago

Thanks for the issue, I think that is a good argument in favor of changing it.

rplevy commented 12 years ago

Commits 1edec3 through 88f1d1 change the behavior to remove special handling of quoted forms.