On Saturday 06 January 2007 15:53, Slava Pestov wrote:

> Sometimes we /do/ want to USE: internals vocabularies. Eg, sequence
> combinators like 'each' use the sequence-internals vocabulary words
> such as nth-unsafe.

libs/foo.factor :

IN: foo-internals

: (a) ... ;

: (b) ... ;

IN: foo

: a ... ;

: b ... ;

: c ... ;

In a fresh Factor image, you can do USE: foo and Factor will notice that foo 
doesn't yet exist so it'll look for and find libs/foo.factor and run-file it. 
Then it will perform the actuall use+. That run-file actually created 
vocabularies foo and foo-internals. So now you can USE: foo-internals as 
well.

The only limitation is that you cannot force load libs/foo.factor into a 
pristine image by USE: foo-internals because that vocabulary name doesn't map 
onto a file. There is not a problem with USE: on foo-internals after it has 
been created.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to