unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: Andy Wingo <wingo@pobox.com>,
	Peter TB Brett <peter@peter-b.co.uk>,
	guile-devel@gnu.org
Subject: Re: syntax-local-binding
Date: Wed, 25 Jan 2012 08:49:16 +0100	[thread overview]
Message-ID: <CAGua6m3BzYvhK-WxOjig8Fq7d093wbj6orXb57XJJSKnVhCh4A@mail.gmail.com> (raw)
In-Reply-To: <87ipk0qzsq.fsf@netris.org>

[-- Attachment #1: Type: text/plain, Size: 5405 bytes --]

Hi,

1. module level macro bindings are reachable already with the api. so
beeing able to reach locally
defined one as well can be seen as a way to make that feature complete.

2. (define-syntax name val) (let-syntax ((name val)) ...) etc should be
aboute
creating bindings and hence the binding value should be a feature of scheme
and not
something that depends on the macro expander.

3. weather a syntax object represent a lexical a macro etc. is also
something that has to do
about scheme and not the actual syntax expander.

In this light my view is that this information does not expose any details
about the internals. Without this
function however users may be tempted to manually look into a syntax object
and the resulting code will
brake if we change the internal representation of syntax information. In
short by publishing a rich set of accesssors users will be safe and less
things will brake if we do the change.

However It look to me that changing the syntax representation in racket
would be a monumental task because of the extreemly rich set of features
their macro framework has so it is very good to be
careful in entering features. But note, if these features are defined in a
small set of accessors that logicaly is about getting information that are
defined as scheme and not as something that is internal I would say that
the burden is to a large degree an illusion.

For example the use of syntax-local-binding in syntax-parse is to
(define-syntax class data) or (let-syntax ((class data)) ...) with class
beeing a syntax object pointing to information about a syntax class like a
string syntax class that enables matching of strings only. Now It would be
good and I really like to get help here, if there are any good suggestions
about what I can do to avoid using syntax-local-binding (I managed to
rmeove this dependency for other locis in the code). The point here is that
wingo need to find arguments of code using syntax-local-binding and argue
that it is the natural solution. And Mark need to suggest alternatives and
depending on elegance, performance, safety etc we could agree if a feature
is exoterix and perhaps not needed. For this I can help in suggesting
elements from the syntax-parse code base.

This is my 2c at least
/Stefan


On Wed, Jan 25, 2012 at 3:30 AM, Mark H Weaver <mhw@netris.org> wrote:

> Andy Wingo <wingo@pobox.com> writes:
> > In the spirit of diffusing tension here, feel free to imagine all of my
> > words as coming from Mr. Collins for the duration of this thread ;-)
>
> Hehe :)
>
> > On Tue 24 Jan 2012 14:25, Mark H Weaver <mhw@netris.org> writes:
> >
> >> Andy Wingo <wingo@pobox.com> writes:
> >>
> >>> None of the interfaces that I proposed leak internal psyntax
> >>> representations.
> >>
> >> `syntax-local-binding' leaks the internal representations used for
> >> bindings.
> >
> > You mean, whether something is a lexical, or a macro, or a global, or
> > whatever; OK.
>
> That's actually not what I meant, although I'm not convinced that we
> fully understand the implications of exposing even that much.  One thing
> that is already clear is that `identifier-syntax' and `local-eval' were
> previously capable of emulating variables perfectly before, whereas in
> the presence of `syntax-local-binding' they no longer are.
>
> This is a perfect example of how added flexibility in one aspect can
> lead to _reduced_ flexibility in other aspects.  I think we need more
> time to consider the implications of this.
>
> However, the more serious problem, and the one I was actually talking
> about, is the _second_ value returned by `syntax-local-binding', which
> exposes the representations of bindings stored in the cdrs of the
> psyntax `r' alist.
>
> > Let me offer another example of its utility: writing a macro stepper.
>
> It's not the least bit surprising that exposing internal implementation
> details enables the creation of all kinds of nifty things as external
> programs that would ordinarily need to be internal.  This is perfectly
> obvious.
>
> However, as you wisely said to me when I posted my first `local-eval'
> evaluator-only implementation, this stuff has a cost, and it has to
> justify itself.  I assumed you meant the maintenance cost of supporting
> this advanced functionality indefinitely, and the constraints that it
> places on the freedom of future implementors.  Was I right?
>
> In retrospect, based on your recent behavior, I wonder if that's what
> you meant or if you were talking about something completely different,
> because you seem to have completely abandoned your original restraint,
> and have now gone much farther than I would ever dare to go.  Indeed, as
> you can see, I am very unhappy about how far you have gone with this.
>
> > Perhaps, though, at this point we're just going to have to agree to
> > disagree;
>
> This is a euphemism for "sorry, but we're doing it my way".  Multiple
> people here have expressed grave concerns about your approach, and not a
> single person has publicly expressed their support for adding all of
> these new interfaces you've designed.  Even Ludovic has remained silent.
> And yet you apparently intend to rush all of this stuff into 2.0.4.
> After all, nothing could be worse than having `the-environment' in
> psyntax, even for single release.
>
> Is this your idea of a consensus process, which you so often advocate?
>
>     Mark
>
>

[-- Attachment #2: Type: text/html, Size: 6362 bytes --]

  reply	other threads:[~2012-01-25  7:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15 17:00 syntax-local-binding Andy Wingo
2012-01-15 17:22 ` syntax-local-binding Andy Wingo
2012-01-19 11:41   ` syntax-local-binding Andy Wingo
2012-01-20 20:26     ` syntax-local-binding Mark H Weaver
2012-01-20 21:23       ` syntax-local-binding Andy Wingo
2012-01-20 22:03         ` syntax-local-binding Mark H Weaver
2012-01-22  0:03           ` syntax-local-binding Ludovic Courtès
2012-01-23 16:05           ` syntax-local-binding Andy Wingo
2012-01-23 21:03             ` syntax-local-binding Mark H Weaver
2012-01-23 22:19               ` syntax-local-binding Andy Wingo
2012-01-24  2:11                 ` syntax-local-binding Mark H Weaver
2012-01-24 11:42                   ` syntax-local-binding Andy Wingo
2012-01-24 17:29                     ` syntax-local-binding Noah Lavine
2012-01-24 10:30                 ` syntax-local-binding Peter TB Brett
2012-01-24 10:38                   ` syntax-local-binding David Kastrup
2012-01-24 11:26                   ` syntax-local-binding Andy Wingo
2012-01-24 13:25                     ` syntax-local-binding Mark H Weaver
2012-01-24 20:28                       ` mark uniqueness (Was: Re: syntax-local-binding) Andy Wingo
2012-01-25  0:26                         ` mark uniqueness Mark H Weaver
2012-01-25  9:02                           ` Andy Wingo
2012-01-24 21:22                       ` syntax-local-binding Andy Wingo
2012-01-25  2:30                         ` syntax-local-binding Mark H Weaver
2012-01-25  7:49                           ` Stefan Israelsson Tampe [this message]
2012-01-25 11:18                           ` syntax-local-binding Andy Wingo
2012-01-25 13:18                           ` syntax-local-binding Ludovic Courtès
2012-01-25 18:08                             ` syntax-local-binding Mark H Weaver
2012-01-26 11:21                             ` syntax-local-binding Andy Wingo

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=CAGua6m3BzYvhK-WxOjig8Fq7d093wbj6orXb57XJJSKnVhCh4A@mail.gmail.com \
    --to=stefan.itampe@gmail.com \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.org \
    --cc=peter@peter-b.co.uk \
    --cc=wingo@pobox.com \
    /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).