unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* doc autoload
@ 2005-01-01 23:19 Kevin Ryde
  2005-01-02  2:20 ` Ken Raeburn
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Ryde @ 2005-01-01 23:19 UTC (permalink / raw)


Correction to define-modules #:autoload, it read like the arg was a
single symbol, but it's actually a list.


    `#:autoload MODULE SYMBOL-LIST'
          Load MODULE when any of SYMBOL-LIST are accessed.  For
          example,

               (define-module (my mod)
                 #:autoload (srfi srfi-1) (partition delete-duplicates))
               ...
               (if something
                   (set! foo (delete-duplicates ...)))

          When a module is autoloaded, all it's bindings become
          available.  SYMBOL-LIST is just those that will first trigger
          the load.

          An autoload is a good way to defer loading a big module until
          it's really needed, for instance for faster startup or if it
          will only be needed in certain circumstances.

          `@' can do a similar thing (*note Using Guile Modules::), but
          in that case an `@' form must be written every time a binding
          from the module is used.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-01-03 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-01 23:19 doc autoload Kevin Ryde
2005-01-02  2:20 ` Ken Raeburn
2005-01-03 20:49   ` Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).