2017-07-29 10:33 GMT+02:00 Shiro Kawai <xxxxxx@gmail.com>:
I don't think you need to worry about implementation being abstract, as far as the spec is clear and easy to remember.  In some cases, showing a simple implementation conveys the idea clearly and precisely; in some other cases, a simple and clear spec needs a convoluted implementation just to cover pitfalls.  The latter case doesn't need to be taken as a bad sign, imho.

Specializing to common cases is a valid argument.  I prefer the consistency to the asymmetry, but opinions may differ.  I just think ease of implementation shouldn't be a reason of reducing generality (except the case that there's no known way to implement the given spec efficiently.)


Thanks for this remark. I agree that clean specification is more important
than clean implementation, but the fact that these two not always coincide
is problematic, and shows that there is some problem with the language
(more specifically, with the syntax-rules pattern language). Eventually,
programs can also serve as specifications.

(On the more practical side, I allowed myself to write "The exact and precise
specification in terms of syntax-rules is given in the Implementation
section" in the first draft of SRFI-156, but it seems that I'll need to
be more specific with the new reference implementation)