Re: Defining a library in one file

Dustin Voss <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <[email protected]>
On Feb 17, 2013, at 7:21 AM, Hannes Mehnert <[email protected]> wrote:

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

You mean like this?

Use-Libraries:
    common-dylan, exclude: { simple-io };
    io
Use-Modules:
    common-dylan, rename: { debug-message -> log },
          export: log;
    format-out;

It might be simpler to just map each header to a single definer clause rather than a semicolon-separated list of clauses, and keep it as “Use-Library” and “Use-Module”.

I might also suggest adding “Module-Creates” as follows (keeping the noun-verb pattern):

Module-Exports:
    log-to-file
Module-Creates:
    log-formatter, *log-file-name*

Or perhaps call them “Export-Module-Names” and “Create-Module-Names” to keep the verb-noun pattern of “Use-Library” and “Use-Module”.

BUT! Overall, sounds good to me.

—Dustin.
_______________________________________________
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.