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

[REBOL] Re: Limit on Globals?

From: ryanc:iesco-dms at: 6-Nov-2001 10:13

Tim Johnson wrote:
> Hello All: > I'm struggling with code bloat here<sigh>. > I have a large application with a significant number of global words. > > 1)Does anyone have any ideas as to what would be a reasonable limit > on the number of global words?
1903 by my test...
>> repeat i 40000 [
[ ctr: i [ set to-word to-string i i [ ] ** Internal Error: No more global variable space ** Where: to-word ** Near: to word! :value
>> ctr
== 1903
>> > > 2)Is there an advantage to putting global words into an object? >
I have not been able to find any performance gain whatsoever. I would say there is some advantage logistically, helping to avoid naming conflicts, code portability, and just a way to devide up your source into understandable chunks. In a large program, you may look into coding it in dialect at the higher levels. This would take care of most naming conflicts too. Once you have gotten to objects, dialecting is just around the bind. --Ryan