unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: guile-devel@gnu.org
Subject: Making apostrophe, backtick, etc. hygienic?
Date: Sun, 30 Aug 2015 14:30:29 +0200	[thread overview]
Message-ID: <87a8t9gdqy.fsf@T420.taylan> (raw)

This is a bit of a crank idea, but here goes.

Today I wasted some time trying to find the bug in the following piece
of code:

    (define (syntax-car syntax)
      (syntax-case syntax () ((car . cdr) #'car)))

Better error reporting in macro-expansion errors might have made it less
painful, but maybe we can solve the problem itself.

How about making 'foo turn into something like (__quote__ foo), and
similar for `foo, #'foo, etc.?  Where __quote__ is just a synonym to
quote, and the original works too.  Ideal would be a symbol that's not
as noisy (in debug output) but still highly improbable to appear in user
code and be accidentally shadowed.

Maybe it would not be standards-compliant in the strict sense, but I
believe it would be an improvement.

Am I missing any obvious downsides?  Or any subtle ones?

I peeked into Guile's sources to see where one might start implementing
this (read.c, expand.c, psyntax.scm?) but better to ask for some input
since it might be a controversial change, and I'm still a total noob in
Guile's code-base.

Taylan



             reply	other threads:[~2015-08-30 12:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-30 12:30 Taylan Ulrich Bayırlı/Kammer [this message]
2015-08-30 12:48 ` Making apostrophe, backtick, etc. hygienic? Panicz Maciej Godek
2015-08-30 13:16   ` Taylan Ulrich Bayırlı/Kammer
2015-08-30 13:57     ` Panicz Maciej Godek
2015-08-30 14:47       ` Taylan Ulrich Bayırlı/Kammer
2015-08-31 11:58         ` Panicz Maciej Godek
2015-08-31 13:10           ` Taylan Ulrich Bayırlı/Kammer
2015-09-02  2:55 ` Mark H Weaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8t9gdqy.fsf@T420.taylan \
    --to=taylanbayirli@gmail.com \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).