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

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Mon Jul 2 12:14:02 EDT 2012

On 2012-07-01 09:27:00 -0400, Eli Barzilay wrote:
> A more robust way to do that, which has become idiomatic in Racket is
> to use (gensym).  (And as a sidenote, in other implementations there
> are various similar eq-based hacks.)  IMO, this is an attempt to
> improve on the #f case by guaranteeing a unique value, but at its core
> it's still a similar hack.

The gensym thing is used in parts of the GUI code for initialization
arguments, e.g.:

 (class* mred% (area<%>)
   (init mk-wx get-wx-pan get-outer-wx-pan mismatches prnt
         [min-width no-val]
         [min-height no-val]
         [stretchable-width no-val]
         [stretchable-height no-val])

Where `no-val` has been defined with a gensym.  So it'd be nice to have
the distinguished `no-argument` for these cases too.


Posted on the dev mailing list.