Hello,

libs/vocabs is nice because people can migrate over to it gradually and 
easily. I say gradually because it's possible an existing module to use one 
of the vocabularies setup with the vocabs system. For example, I have the 
beginnings of a non-core namespaces vocabulary called namespaces.lib. Any 
existing module can use this easily. libs/vocabs is available as a standard 
module so put this at the start of your file:

        REQUIRES: libs/vocabs ;

That's all you need to hook into the new system. To "use" any vocabularies 
setup with this new system, just use them. So your code could do:

        USING: namespaces.lib hashtables.lib x ;

And it would automatically load in the right files.

So there's really nothing to mixing the current modules and the new vocab 
style.

Converting the existing user contributed code base (apps libs demos) is really 
trivial with libs/vocabs. Most of the work will be simply removing 
load.factor files. Some complex vocabs like tetris and xml would have to 
rename vocabularies, mainly replacing - with . and moving each vocab into 
it's own directrory. For example:

        tetris-piece => tetris.piece

And the file would be:

        libs/tetris/piece/piece.factor

So the way vocabs is designed, we have the option of moving over gradually. In 
fact, all the user contributed stuff could convert without the core 
converting. Or we can do it all at once.

Note: *** This conversion will not affect most vocabulary names ***

The exception is hierarchical vocabs such as the tetris.piece example. But 
things like parser-combinators and concurrency would stay the same; their 
names would not be impacted.

libs/vocabs brings along some new things and will require adjustments. But as 
you can see, the change over should be easy and painless. In fact it will be 
helpful because it promotes organization.

All of this nice and gradual change over is due to one feature: vocabulary 
roots.

Slava, if you want to not have an easy transition, put more work on yourself 
and the community, and really force a huge bowel movement in 0.89, then go 
ahead and not utilize vocabulary roots. You'll have a hugh and (as I 
demonstrated) avoidable impact upon the code base in terms of vocabulary 
renaming and their location in the filesystem.

I think a good plan is this. Switch to vocabs as it currently is. Use it for a 
while. Get some experience. After 0.89 if you still want to have names like:

        games.tetris.piece

or in my case:

        libs.x.widgets.keymenu

and crazynuts USING: lines like this:

USING: kernel namespaces math vectors hashtables sequences threads gadgets
       libs.math-contrib
       libs.matrices
       libs.vars
       libs.slate
       opengl
       libs.rewrite-closures
       libs.gadgets.handler
       demos.lsys.strings
       demos.lsys.opengl
       demos.lsys.turtle
       demos.lsys.camera ;

then by all means, eliminate the helpful concept of vocabulary roots.

But by doing so you are letting the filesystem control you instead of using it 
as an organizational tool. And when you're struggling with those crazy vocab 
names, just imagine the paradise that smalltalkers live in. There's no hint 
of modules in their class and method definitions. They don't have to say "I'd 
like to use this set of classes now, please USE: it". All they do is:

        Boids new

All the classes are always available.

Their version of modules and vocabulary files is basically file-in. They do it 
once and ***forget*** about files and where they exist in the filesystem. With 
names like:

        libs.x.widget.keymenu

I can *never forget* about the damned filesystem because it's rearing it's 
ugly head in *every* vocabulary name. That is super lame.

The current module system took us farther away from the smalltalk example. 
Overly strict file/vocab-name correspondence will take us even farther.

I think it's a bad direction to move Factor in. But of course it's your call. 
After all, at the end of the day I can always pick up that Haskell or Squeak 
book I've been meaning to work through. :-)

Ed


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to