On Tue, Oct 28, 2014 at 11:02:40PM +0100, Michele La Monaca wrote:
On Tue, Oct 28, 2014 at 9:35 PM, Peter Bex peter@xs4all.nl wrote:
Yes, this is according to spec. Macros aren't first-class, so whenever
you use the same identifier in a non-application context it will look up
the
Peter Bex scripsit:
This inconsistency could be considered a bug: if a new identifier is
introduced at the toplevel which shadows a macro, it could erase the
macro. It's not a priority because the spec doesn't really say what to
do, and the responses of various Schemes differ in this.
Hi,
shadowing a macro doesn't seem to work properly in all the cases:
(define-syntax my-begin (syntax-rules () ((_ x ...) (begin x ...
(let ((my-begin -)) (my-begin 0 1)) ; = -1 (ok)
(define my-begin -)
(apply my-begin '(0 1)) ; = -1 (ok)
(my-begin 0 1) ; =
On Tue, Oct 28, 2014 at 09:31:44PM +0100, Michele La Monaca wrote:
Hi,
shadowing a macro doesn't seem to work properly in all the cases:
(define-syntax my-begin (syntax-rules () ((_ x ...) (begin x ...
(let ((my-begin -)) (my-begin 0 1)) ; = -1 (ok)
(define my-begin -)
(apply
Hi,
shadowing a macro doesn't seem to work properly in all the cases:
(define-syntax my-begin (syntax-rules () ((_ x ...) (begin x ...
(let ((my-begin -)) (my-begin 0 1)) ; = -1 (ok)
(define my-begin -)
(apply my-begin '(0 1)) ; = -1 (ok)
(my-begin 0 1) ; =
On Tue, Oct 28, 2014 at 9:35 PM, Peter Bex peter@xs4all.nl wrote:
Yes, this is according to spec. Macros aren't first-class, so whenever
you use the same identifier in a non-application context it will look up
the identifier in the runtime environment. In application context it
will
Michele La Monaca scripsit:
Thus `my-begin' acts as either a procedure or a macro depending on
the context.
Right. Redefining, as opposed to shadowing, a syntax keyword doesn't
destroy its definition as a syntax keyword. However, if it's used in
a context where it cannot be a syntax keyword,