[racket-dev] Proposal for a "no-argument"

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Jul 8 08:40:41 EDT 2012

Quick summary: I'll remove the #:before-first and #:after-last
feature.  If anyone wants them, please tell me -- maybe it can be left
for the spliced case, or maybe they could always be spliced.


On Monday, Matthew Flatt wrote:
> I'm not enthusiastic about this proposal.
> 
> As you say at the start, it seems like a rare case. My main
> objection is that it's too rare to merit a change to the main
> `lambda' form and other parts of our infrastructure, such as
> documentation tools.

This -- a more substantial extension of `lambda' and friends -- seems
to be the core issue here.  I've talked about it to Matthias, and we
agreed on something that would help.  I'll post about it separately,
when I land.


> As a weaker objection, I don't agree with the suggestion that naive
> users can somehow ignore the `no-argument' value. I think it would show
> up prominently in documentation, contracts, and types.

I didn't mean that they'll ignore it -- I meant that having a default
expression that is rendered as "no-argument" or something similar is
self explanatory in a better way than "....", and definitely from an
additional #:nothing argument (which is an actual interface change in
addition to being obscure).


> Weaker still, in terms of how well I can defend it: I'm suspicious
> of "no-value" values in general. Granted, we already have `#f',
> #<void>, and #<undefined>, but I'm not really happy about that (and
> I keep thinking about ways to get rid of #<undefined>).

This could be solved, roughly, by what both Robby and Matthias
suggested (protecting it from leaking out), but on one hand there's a
problem with that, and on the other it makes it equivalent to exposing
a boolean flag for the presence of an argument.  That's the thing that
I'll delay for a proper post on that.  Side-question: do you have some
potential direction for eliminating #<undefined>?  (Asking because it
might apply here too.)

(Is there any problem with #<void>?)

Meanwhile, the interface change, the gensym-encouraging, and the
obscurer explanation really bother me, so I'll just get rid of the
need for them by removing the #:before-first and #:after-last feature.

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

Posted on the dev mailing list.