[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lily-library.scm question
From: |
Patrick McCarty |
Subject: |
Re: lily-library.scm question |
Date: |
Fri, 29 May 2009 23:51:15 -0700 |
On Fri, May 29, 2009 at 5:54 PM, Mark Polesky <address@hidden> wrote:
>
> Patrick McCarty wrote:
>> The "define" procedures are generally only available within a
>> single module .... "define-public" creates a sort of *global
>> procedure*; any module has access to it.
>
> Yes, but how would I access "list-minus", or "cons-map" from
> another file if I wanted to? In lily-library.scm, there's no
> module defined, no exported procedures, and in fact, no usage of
> those 2 procedures (as an example) within that file. Is there some
> performance or memory cost when using define-public? Or was it
> just an honest mistake, using "define" instead of "define-public"?
Looking through the source a little more, it looks like any scheme
file in "init-scheme-files" (scm/lily.scm) has access to any procedure
loaded from those files, no matter if they are "define" or
"define-public". So, any external procedures accessed from LY files
appear to require "define-public".
I'm also noticing that many scheme files *not* in "init-scheme-files"
contain "define-module".
I don't know if there is any performance penalty, but it's probably
negligible. You could propose that these procedures be made public; I
am okay with it.
-Patrick