Re: Defining a library in one file

Carl Gay <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <CALekcH1ZxmeSu4X+g29kS8oZ0XJ5GVt5A+Q6G73ia5Xssca_Tw@mail.gmail.com>
On Sun, Feb 17, 2013 at 10:21 AM, Hannes Mehnert <[email protected]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA384
>
> Hi Carl,
>
> I appreciate that step forward.
>
> I'd consider naming the keywords "Use-Libraries" and "Use-Modules"
> (these are case-independent according to DRM anyways), and then limit
> the header to one occurrence of these keywords - similar to what
> Gwydion Dylan does/did for compatibility.
>

Thanks for the comments, Hannes.

I have no problem with Use-Modules and Use-Libraries, each of which may
span multiple lines.  It was a toss-up for me, and I chose the other way
somewhat arbitrarily.  Come to think of it, I'm pretty sure abeaumont said
he prefers plural headers as well.


>
> I would require each "Use-*" keyword to span over a single line, which
> is generally true for the file headers of Dylan files (see
> http://opendylan.org/books/drm/Dylan_Interchange_Format).
>
>
> I do not really see a reason for the module-exports header: I don't
> see these single-file Dylan applications to libraries (meaning: if you
> want to export something, use with make-dylan-app and have those files
> separately). But maybe I don't see everything here.
>

I don't see any reason not to have it.  As I say in the DEP there are
plenty of small libraries (which aren't "scripts") that can fit in one file
comfortably.  One case that I didn't think to mention was test suites!


>
> On the implementation side, it'll be challenging to convince Open
> Dylan to switch the home module within a single source file, but I'm
> sure we'll be smart enough to figure out how to do that.


I believe there are bugs in the IDE related to changing the name of a
module and/or library too, even with multi-file libraries, so I don't doubt
it.  :-)


> I would
> prefer to support it in the compiler, rather than generating temporary
> Dylan/lid files.
>

Yup, that suggestion was just to clarify the semantics.


> Cheers,
>
> Hannes
>
>
> On 17/02/2013 05:00, Carl Gay wrote:
> > Hi.  I would like to get feedback on a proposal for a way to define
> > Dylan libraries with a single file rather than the current minimum
> > three files: LID file, library file, main program file.  You can
> > read it
> > formatted<
> https://github.com/cgay/website/blob/single-file-library-dep/source/proposals/dep-0006.rst
> >
> >
> >
> and
> > reply here with your comments, or
> > plain<https://github.com/dylan-lang/website/pull/40/files>and
> > leave your comments directly in the document.  The latter requires
> > a github account.
> >
> > Thanks. -Carl
> >
> >
> >
> > _______________________________________________ hackers mailing
> > list [email protected]
> > https://lists.opendylan.org/mailman/listinfo/hackers
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
>
> iQIcBAEBCQAGBQJRIPWSAAoJELyJZYjffCju5SAP/060BKiwigniuRXJjXwcFbvM
> 7lBWN0ZOLpdBLTHvX7L28La8RwzyWOgoxL+1/TFhNJk4l4M0016HNJCuPdCcPAmt
> 23yESEezjJxebF8yy5RyoYb/sSYkV4TTpihkHcxFSA1EZS7evJ2ZfuVPyz2PIl+H
> QzjIqJ+Eoq8x0vTIgKJ5syJA4/Egvo7MNyrzL3q+odvY8Ks9DSatMOeVBFDISRsN
> 2aapLes4sZ+4B+k7G9aiHP/EuY9772PXbYnJDroLxcC5VFmcq7WEpTUwqG46bXen
> fnpOdYeGx6eL9HZBcnbsR70wRuA8BBMYXd3/B4KBDKLEixF746lo3lPTydjOoS2S
> c4NtrPXSepXEXKM7MjmrTHZ08GVqSSYQbNHvxsgeNMZg1tMAi1Q6aIZlMWJA7tQd
> udoiR40fP8nssMD5YYsKffKbJnTFoPgQ01Kn9H3MWv9BRg10KGqA7wvwi1QE16aR
> HBlcY7/PGIxn6DBLipfnklFS879oERQzmF9m82FxjOcxP7zCbSMGJnEb5EM/Fp+3
> N0KSEjEQ2uLRbUUV1HjGoZ17siChbDLdzOQ42HGOs96sGv7jjIuDrXYZxcMtr0sk
> dNOTjrWwOeGujRBzcg8+hFGPblvMczXGGfwEvhS4dC9lgKLB2f4VSUELASxgHkQr
> n6AGXV9CzRb7C8lYVm1U
> =IsQR
> -----END PGP SIGNATURE-----
> _______________________________________________
> hackers mailing list
> [email protected]
> https://lists.opendylan.org/mailman/listinfo/hackers
>

_______________________________________________
hackers mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.