[m-dev.] Patch: Tcl/Tk interface without '%' prompt

Jonathan Morgan jonmmorgan at gmail.com
Thu Jan 18 22:49:46 AEDT 2007


On 1/17/07, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>
> On Wed, 17 Jan 2007, Jonathan Morgan wrote:
>
> > On 1/17/07, Jörg Roman Rudnick <joerg.rudnick at t-online.de> wrote:
> >> Next comes the revised Tcl/Tk-Interface, which I propose to be placed in
> >> a new namespace - tcl. .../tk. ... - to prevent collisions with mtcltk.
> >> .../mtk. ... . Certainly, there some questions remaining which I will
> >> pose soon.
> >
> > I feel fairly strongly that wrapper libraries should retain their
> > proper name (e.g. tcl, tk), rather than assuming a name like mtk,
> > mtcltk, mogl, etc.  The only potential problem with this naming that I
> > can think of is if it ends up with two libraries with the same name
> > and a different path, confusing the linker.
>
> The usual technique is to create a package, say mercury_tcltk, and
> the overall library will named that.  By wrapper libraries above
> you are presumably referring to the actual module names?

By wrapper library, I am referring to a Mercury library which provides
a Mercury interface to an existing C library.  I think that the
(module) name should be the name of the library the module is
wrapping.

With regard to mercury_tcltk and similar libraries, I think that the
name should be unnecessary (I already know that I'm using Mercury),
and I can't see that it helps (the manual isn't very clear, but I
don't think that the importing it will cause the imported libraries
(e.g. mtcltk, mtk) to be imported into the calling module.  My memory
is also that the samples imported mtcltk and mtk directly, rather than
going through mercury_tcltk.

With regard to naming, I think that the Tcl wrapper module should be
called 'tcl' and the Tk interface built on it should be called 'tk',
possibly also containing sub-modules as necessary.  There should be no
necessity for some kind of a wrapper module with imports like
mercury_tcltk.  I certainly intend to have the Gtk+ modules using
module names 'gtk', 'glib', and similar.

Jon

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list