Re: [Scheme-reports] "module" vs. "library" Denis Washington (04 Jul 2011 18:02 UTC)
Re: [Scheme-reports] "module" vs. "library" John Cowan (05 Jul 2011 00:39 UTC)
Re: [Scheme-reports] "module" vs. "library" Andre van Tonder (05 Jul 2011 01:31 UTC)
Re: [Scheme-reports] "module" vs. "library" John Cowan (05 Jul 2011 04:06 UTC)
Re: [Scheme-reports] "module" vs. "library" Denis Washington (07 Jul 2011 16:06 UTC)
Re: [Scheme-reports] "module" vs. "library" John Cowan (07 Jul 2011 17:53 UTC)
Re: [Scheme-reports] "module" vs. "library" Denis Washington (07 Jul 2011 18:30 UTC)
Re: [Scheme-reports] "module" vs. "library" Alaric Snell-Pym (08 Jul 2011 09:49 UTC)
Re: [Scheme-reports] "module" vs. "library" Denis Washington (08 Jul 2011 10:13 UTC)
Re: [Scheme-reports] "module" vs. "library" Alaric Snell-Pym (08 Jul 2011 10:46 UTC)
Re: [Scheme-reports] "module" vs. "library" Eli Barzilay (08 Jul 2011 14:16 UTC)
Re: [Scheme-reports] "module" vs. "library" Aaron W. Hsu (05 Jul 2011 04:46 UTC)
Re: [Scheme-reports] "module" vs. "library" John Cowan (05 Jul 2011 04:53 UTC)
Re: [Scheme-reports] "module" vs. "library" Andre van Tonder (05 Jul 2011 13:47 UTC)
Re: [Scheme-reports] "module" vs. "library" Alex Shinn (05 Jul 2011 14:20 UTC)
Re: [Scheme-reports] "module" vs. "library" Andy Wingo (05 Jul 2011 22:01 UTC)
Re: [Scheme-reports] "module" vs. "library" Alex Shinn (05 Jul 2011 23:21 UTC)
Re: [Scheme-reports] "module" vs. "library" Eli Barzilay (06 Jul 2011 03:33 UTC)
Re: [Scheme-reports] "module" vs. "library" John Cowan (05 Jul 2011 17:11 UTC)
Re: [Scheme-reports] "module" vs. "library" Andre van Tonder (05 Jul 2011 22:07 UTC)
Re: [Scheme-reports] "module" vs. "library" Alex Shinn (05 Jul 2011 23:22 UTC)
Re: [Scheme-reports] "module" vs. "library" John Cowan (08 Jul 2011 03:31 UTC)

Re: [Scheme-reports] "module" vs. "library" John Cowan 08 Jul 2011 02:50 UTC

Andre van Tonder scripsit:

> No, INCLUDE expands to a BEGIN form and so can occur anywhere a BEGIN can
> occur, so you can use it to include code in any <body>, say, where it is
> not equivalent to LOAD.

I was speaking of the top level of the REPL.  But you're quite right about
expanding to a `begin`; I had overlooked that.

> This is a poor reason either way, since your proposed usage of INCLUDE in
> modules has exactly the same directory portability problem.

An implementation controls where the modules are stored, and will be
able to use an appropriate mapping convention (look in the same
directory as the module, or whatever).  Scheme scripts could be anywhere
on the system, and will be hard to move about if their include files have
to go with them.

> A case-folding INCLUDE-CI can just as easily be implemented as an
> ordinary form.

To be sure.

> Understood, but you can still have this separation of concerns if INCLUDE
> is a form instead of part of the module language.  On the Scheme code
> file side there would be no difference.  On the module side, the
> resulting module boilerplate would look almost the same.

If `include` is a regular part of Scheme, that means it can be generated
by a macro, which means that static analysis of modules is not possible.

> Plus, traditional INCLUDE is nicely compositional.  An INCLUDEd file can
> in turn INCLUDE otehr files, ad nauseam.  On the other hand, WG1
> module-level INCLUDE is not compositional.  This is fine but, again,
> somewhat ugly IMO.

For static analysis, non-compositionality is an advantage.

--
John Cowan    http://ccil.org/~cowan  cowan@ccil.org
Arise, you prisoners of Windows / Arise, you slaves of Redmond, Wash,
The day and hour soon are coming / When all the IT folks say "Gosh!"
It isn't from a clever lawsuit / That Windowsland will finally fall,
But thousands writing open source code / Like mice who nibble through a wall.
        --The Linux-nationale by Greg Baker

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports