[R6RS] [r6rs-discuss] Problems with import syntax

R. Kent Dybvig dyb at cs.indiana.edu
Wed Jun 27 16:17:21 EDT 2007


I've made the changes to library.tex that I discussed below.  Please check
to make sure I haven't made the situation worse.

Kent

--------

> From r6rs-discuss-bounces at lists.r6rs.org  Wed Jun 27 16:02:34 2007
> From: "R. Kent Dybvig" <dyb at cs.indiana.edu>
> Date: Wed, 27 Jun 2007 16:01:34 -0400
> To: r6rs-discuss at lists.r6rs.org
> Subject: Re: [r6rs-discuss] Problems with import syntax
> List-Id: R6RS discussion <r6rs-discuss.lists.r6rs.org>
> X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0'
>
> > I think the LIBRARY keyword is in the wrong place.  I believe that,
> > to eliminate ambiguities, it should be part of <library reference>, /not/
> > <import set>.
>
> (library <library reference>) was supposed to be an <import set>, which I
> think is equivalent to what you are suggesting.  Otherwise one cannot use
> the library form for disambiguation within an <import set>.
>
> Also, although not noted among the changes, the "and" and "or" import
> syntaxes can no longer be empty, and the "except", "only", and "rename"
> forms can no longer list zero identifiers or identifier pairs.  As has
> been noted, these degenerate cases contributed to the ambiguity problem
> and they serve no useful purpose.
>
> > The spec also says:
> >
> >    The syntax of an <import spec> is interpreted outermost to innermost if
> >    ambiguities arise.
> >
> > This could be dropped if the above suggestion is adopted, in which case the
> > syntax would be unambiguous.
>
> The point of this was to avoid requiring implementations to backtrack to
> resolve ambiguities, including those that can arise if a programmer
> chooses not to use the "library" form, but it's confusing and probably
> doesn't achieve the goal.  I propose to replace this with the following
> requirement:
>
>   A <library reference> whose first <identifier> is "library", "only",
>   "except", "prefix", or "rename" is permitted only within a "library"
>   <import set>.  The <import set> (library <library reference>) is
>   otherwise equivalent to <library reference>. 
>
> I believe this accomplishes the intended goal more simply.
>
> > I am still hoping, though, that versions will
> > be dropped or simplified, in which case LIBRARY will not even be necessary.
>
> A majority of the editors are in favor of retaining versions, so I don't
> expect this to happen before our adoption candidate is released.
>
> Kent
>
> _______________________________________________
> r6rs-discuss mailing list
> r6rs-discuss at lists.r6rs.org
> http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
>



More information about the R6RS mailing list