[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: propositions, oppositions, and some minor details

This page is part of the web mail archives of SRFI 57 from before July 7th, 2015. The new archives for SRFI 57 contain all messages, not just those from before July 7th, 2015.

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

  (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.