On Friday 19 January 2007 02:27, Slava Pestov wrote:

> You have both apps/factory/ and apps/factory.factor. I don't like
> this.

With a system like vocabs, as part of the design process you have to make a 
decision. How do you map vocabularies to files?

METHOD A:

        USE: x          =>      x/x.factor

        USE: y          =>      y/y.factor

        USE: x.foo              =>      x/foo/foo.factor

        USE: x.foo.bar  =>      x/foo/bar/bar.factor

This was my first mapping scheme. It's a simple function. It would solve the 
annoyance of factory.factor and factory/ in the same directory. However there 
was an even bigger annoyance. As you can see, each vocabulary get's it's own 
directory. I thought about what this would be like with a system like the x 
vocabulary and the associated hierarchy. I really like being able to open the 
directory x/ and see all *.factor files that implement the sub vocabs of x. 
With METHOD A, I'd see a bunch of directories, most of which only hold a 
single file. It was this property, that the majority of directories would 
only serve to hold a single file that made me look for another mapping 
scheme.

METHOD B:

        USE: x  =>      x.factor

        USE: y  =>      y.factor

        USE: x.foo              => x/foo.factor

        USE: x.foo.bar  => x/foo/bar.factor

        USE: x.foo.baaz => x/foo/baaz.factor

OK. This doesn't have the one directory per vocabulary problem. You open the 
x/foo directory and you'll see the bar and baaz files. Nice. Slava opens libs 
and sees x.factor and x/. Not so nice. :-) I thought the same thing. But I 
realized that I'd have to put up with one annoyance or another. Either 
annoyance comes from a using a strict function to map. The system yields 
benefits that come from this discipline (and bondage! haha) but coders are so 
used to adhoc organization of files that this seems more like a wart.

I have to think about the mapping method before I change things.

Sorry for the long explanation but I wanted you to see that this wasn't just 
something I picked willy-nilly.

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