unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Making apostrophe, backtick, etc. hygienic?
@ 2015-08-30 12:30 Taylan Ulrich Bayırlı/Kammer
  2015-08-30 12:48 ` Panicz Maciej Godek
  2015-09-02  2:55 ` Mark H Weaver
  0 siblings, 2 replies; 8+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-08-30 12:30 UTC (permalink / raw)
  To: guile-devel

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-02  2:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-30 12:30 Making apostrophe, backtick, etc. hygienic? Taylan Ulrich Bayırlı/Kammer
2015-08-30 12:48 ` 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

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).