[racket] member et al.

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Nov 11 11:08:19 EST 2010

Four minutes ago, Neil Toronto wrote:
> Possibly unrelated, but I also had to write my own `member?' when I
> encoded a Bayesian spam filter in the Bayesian DSL I'm making. I
> didn't want a distribution over all Racket values, I wanted one over
> {#t,#f}.  In fact, I'm going to have to wrap all the truth-valued
> functions because of this. [...]

That's a much stickier issue, since it easily leads you to require
that `and' and `or' are boolean, which destroys their tail-ness.
(IMO, this is an important factor in keeping the non-#f business.)


> I think we should retire this truthiness business, replace cond's
> `=>' with something that lets you easily nest conds (I have a
> proposal ready for this, and it is awesome),

(a) how is this related?  (b) `=>' is not used to nest `cond's.


> and stop using truthiness idioms. It's obfuscating, it's hard on
> newcomers, it makes reasoning about return values difficult, and
> it's very last-century.

(And tail-call-{optimization,elimination} is very this-century...)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.