Email list hosting service & mailing list manager


Re: propositions, oppositions, and some minor details Alex Shinn 15 Sep 2004 01:39 UTC

At Tue, 14 Sep 2004 19:42:18 -0400 (EDT), Andre van Tonder wrote:
>
> On Mon, 13 Sep 2004, Andre van Tonder wrote:
>
> > (define-record-type node make-node #f (left #f #f) (right #f #f))
>
> Another perhaps less ugly possibility would be to use the
> placeholder symbol _, though it is an atom.  E.g. instead of
>
>    (define-record-type point2          #f #f (x #f #f) (y #f #f))
>    (define-record-type (point3 point2) #f #f (x #f #f) (y #f #f) (z #f #f))
>
> we would write
>
>    (define-record-type point2          _ _ (x _ _) (y _ _))
>    (define-record-type (point3 point2) _ _ (x _ _) (y _ _) (z _ _))

But there's never any need for that many #f's, since you can just omit
them:

  (define-record-type point2 #f #f (x) (y))

Nobody is arguing against omitting trailing positional arguments, they
just don't want the positions of arguments to change.

Except in the pathological case of providing setters but no getters
you will have at most two #f's, for constructor and predicate, and it
doesn't seem worthwhile to introduce a keyword just to avoid that.

--
Alex