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

Re: [Scheme-reports] Legacy caar to cddddr



Andre van Tonder writes:

> Another example shows their use in small graph structures: e.g., in
> CDADADR, the list of symbols DADAD describes a descent path in a
> binary tree at a glance.

I think NODE-RLRLR would be clearer and equally concise. With CDADADR,
the reader of the code would need to keep in mind whether there is a
data field and whether the data field is before or after or between
the branches. There might be two or three data fields. And I don't
think I was ever able to simply peek five deep in a tree without first
checking that the path is there. CDADADR presumably does not check.

It would be impossible to remove the general naming scheme or the
specific procedures from the culture, even if somebody wanted to.
They are trivial to define when one wants them, and nothing need
prevent, say, Aubrey Jaffer's interpreter keeping fast versions of
them. I just wondered whether they were a bit too prominent in the
report. I think they are. But then I didn't expect people to be
attached to them at all.

(For destructuring, I would rather use some sort of pattern matching
myself. I have used nested APPLY-calls of LAMBDA expressions that way
in the past, with explicit length checks interleaved.)


_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports