Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Rebol Framework suggestion

From: greggirwin:starband at: 15-Sep-2001 11:30

Hi Chris, I've been thinking about this some more and I thought I'd throw out some ideas to see if anything sticks. What if we start by creating some libraries. We should be able to get at least some small consensus on a reasonable taxonomy from the people here. The RT script library is categorized and provides lots of great examples in specific contexts but, for people just learning REBOL (like me), it can be quite time consuming to sift through the code in the examples to find the bits you need and extract them. I may be unusual but, as much as I like just grabbing something that works and using it, I really like to undertand the tool(s) I'm using. That means taking apart the RT examples and figuring out what each little piece does so I can extract and generalize the bits I need. I'm building up a collection of my own functions and I'll need to organize them somehow, so why not kill two birds with one stone.<g> What if we use contexts for namespacing to manage libs? For example, we could use contributors initials as the top level. rt /math /str /obj gsi /math /str /obj cm /math /str /gfx Alternately, you use the category names as the top level and then just include comments about the contrbutors, if so desired. A key will be simplcity in the naming. That is to say, making sure that using the standard library functions doesn't add so much prefixing that readability suffers. Using a single special character as a prefix, or suffix, might be less intrusive than a "-lib" suffix (as in the example below). *math math* math-lib *str str* str-lib *obj obj* obj-lib *gfx gfx* gfx-lib I don't know what the tradeoffs are between loading a large library of functions into the global space versus putting them in contexts. I.e. are we going to pollute the global space horribly or do we suffer a memory or performance penalty by using contexts? We could also (well, we meaning someone who knows what they're doing <g>) build a tool that would extract only the required definitions and combine them into a deployment file. That way you could develop with the whole library but then take a "snapshot" of the functions you use and put them all in a single file for distribution. Pros? Cons? I'm open to critiques and comments on all sides. I don't think we want to build a big, complex, unREBOLish beast but just a more granular library that people can use and learn from. --Gregg