Re: Patch to add (define-syntax (foo bar) ...) support

2011-09-05 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/02/11 15:33, Ian Price wrote: Andy Wingo wi...@pobox.com writes: On the whole I am skeptical. But, Chez Scheme and Racket both made this change. So I could go either way, though I would like thoughts from other people before proceeding.

Re: Patch to add (define-syntax (foo bar) ...) support

2011-09-02 Thread Andy Wingo
Hi! On Sun 03 Jul 2011 22:19, Chris K. Jester-Young cky...@gmail.com writes: When writing syntax-case macros, often one would write: (define-syntax foo (lambda (bar) (syntax-case bar ...))) This seems overly long-winded; it would be preferable to be able to write,

Re: Patch to add (define-syntax (foo bar) ...) support

2011-09-02 Thread Ian Price
Andy Wingo wi...@pobox.com writes: On the whole I am skeptical. But, Chez Scheme and Racket both made this change. So I could go either way, though I would like thoughts from other people before proceeding. While I like the change, another solution is to try to make a 'syntax-case' form

Re: Patch to add (define-syntax (foo bar) ...) support

2011-09-02 Thread Andy Wingo
On Fri 02 Sep 2011 15:33, Ian Price ianpric...@googlemail.com writes: Andy Wingo wi...@pobox.com writes: On the whole I am skeptical. But, Chez Scheme and Racket both made this change. So I could go either way, though I would like thoughts from other people before proceeding. While I

Patch to add (define-syntax (foo bar) ...) support

2011-07-03 Thread Chris K. Jester-Young
Hi there, When writing syntax-case macros, often one would write: (define-syntax foo (lambda (bar) (syntax-case bar ...))) This seems overly long-winded; it would be preferable to be able to write, instead: (define-syntax (foo bar) (syntax-case bar ...)) Attached

Re: Patch to add (define-syntax (foo bar) ...) support

2011-07-03 Thread Noah Lavine
Hello, I agree that this is much shorter, but I'm worried about defining the short syntax in a way that forces you to choose between syntax-rules and syntax-case. What I mean is that you could just as easily have (define-syntax (foo bar) ...) expand to (define-syntax foo (syntax-rules ()

Re: Patch to add (define-syntax (foo bar) ...) support

2011-07-03 Thread Chris K. Jester-Young
On Sun, Jul 03, 2011 at 04:44:46PM -0400, Noah Lavine wrote: I agree that this is much shorter, but I'm worried about defining the short syntax in a way that forces you to choose between syntax-rules and syntax-case. Except, it doesn't. My version doesn't insert either syntax-case or

Re: Patch to add (define-syntax (foo bar) ...) support

2011-07-03 Thread Noah Lavine
Except, it doesn't. My version doesn't insert either syntax-case or syntax-rules; it just inserts the lambda and lets you do whatever. Oh, I must have been temporarily insane. My apologies. :-) Your idea makes a lot of sense. Noah

Re: Patch to add (define-syntax (foo bar) ...) support

2011-07-03 Thread Ian Price
Looks fine to me. When I started writing portable R6RS code instead of PLT Scheme specific code, this was one thing I missed quite often. Not because it couldn't be done, but because I wanted to avoid having to do (import (except (rnrs) define-syntax) (utils)) every single time I wanted