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

isn't computation-rules redundant?

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



I have the same pet-peeve with {define,let,letrec}-syntax and
syntax-rules, but in

  (define-syntax-computation foo
    (computation-rules () ...))

computation-rules is a noiseword.  You could just as easily write

  (define-syntax-computation foo ()
    ...)

which is shorter and more to the point.  Likewise for the let- and
letrec- versions.  Of course, you do still want computation-rules by
itself for anonymous computations, much as people have made the argument
for syntax-rules by itself.

A possible reason for requiring the explicit computation-rules in the
define- and let- forms is if you want to allow people to use alternate
forms for computation-rules.  For instance, you could "alias" syntax
with:

  (define-syntax-computation foo bar)

or possibly generate something dynamically with

  (define-syntax-computation foo implicit-syntax-inspect-form)

but currently the reference implementation doesn't allow this and these
extensions could be added by pattern matching regardless of whether or
not you require the computation-rules.

Am I missing something?

-- 
Alex