[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] unbound variable: or
From: |
John Cowan |
Subject: |
Re: [Chicken-users] unbound variable: or |
Date: |
Sat, 30 May 2015 13:32:40 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Michele La Monaca scripsit:
> Gambit has it. Too bad Chicken 4 dropped it.
You're right; I was too hasty. There are a number of other Schemes
that accept it also. However, it does not fit into the {define-syntax,
let-syntax, let*-syntax, letrec-syntax} set provided by all post-R4RS
Schemes.
> Let’s say someone had the (bad?) idea to masquerade/embed it in other
> more baroque forms. For example in Chicken you have to write:
Yes, if explicit renaming is available (generally the case except in
Schemes that do syntax-case) then you can simulate it by not renaming
anything. Syntax-case can sort of simulate it, but not 100% accurately.
I'll have more details on who does what posted later when I get my
suite of Schemes working again: at the moment, some of them have
bit-rotted.
> Define-macro is the most basic, no-frills macro system and the one
> which will give you the most profound understanding of what a macro is
> and is not. Oh, and it is quite powerful. I’ve used Gambit to
> practice. Only when you dominate it, I suggest to move on to
> syntax-rules. The latter works at a higher layer (see below), enforces
> hygiene and introduces you to pattern matching (which is not a macro
> specific topic).
That's like saying you should master assembly language before moving on
to a high-level languge like Scheme, because it gives you the most
profound understanding of what a computer does and is quite powerful.
These things are true, but assembly language and low-level macros
also give you the opportunity not only to shoot yourself in the foot,
but to shoot your users in the foot as well: they will write very
reasonable looking macro calls that just won't work because of the
lack of hygiene. Gensym-renaming helps with half of hygiene, but
there's nothing you can do in writing your macro to provide for the
other half of it.
--
John Cowan http://www.ccil.org/~cowan address@hidden
The Unicode Standard does not encode idiosyncratic, personal, novel,
or private use characters, nor does it encode logos or graphics.
- Re: [Chicken-users] unbound variable: or, (continued)
- Re: [Chicken-users] unbound variable: or, Matt Gushee, 2015/05/29
- Re: [Chicken-users] unbound variable: or, John Cowan, 2015/05/29
- Re: [Chicken-users] unbound variable: or, Peter Bex, 2015/05/30
- Re: [Chicken-users] unbound variable: or, Michele La Monaca, 2015/05/30
- Re: [Chicken-users] unbound variable: or, Peter Bex, 2015/05/30
- Re: [Chicken-users] unbound variable: or, Michele La Monaca, 2015/05/30
- Re: [Chicken-users] unbound variable: or, chi, 2015/05/31
- Re: [Chicken-users] unbound variable: or, Peter Danenberg, 2015/05/31
- Re: [Chicken-users] unbound variable: or, Peter Bex, 2015/05/31
- Re: [Chicken-users] unbound variable: or, John Cowan, 2015/05/31
- Re: [Chicken-users] unbound variable: or,
John Cowan <=
Re: [Chicken-users] unbound variable: or, Daniel Leslie, 2015/05/27