tags:

views:

26

answers:

1

I know that the global words is limited to something like 2500 words. What if I fear to reach the limit, I would like to create and destroy words on the fly with something like unset: would that solve the risk or this is just impossible to have something scalable ?

+1  A: 

The limit is on the number of uniquely named words. You can of course have many words of the same name in different contexts; that does not affect the overall count, eg....

context1: context [a: 1 b: 2 c: 3]
context2: context [a: "zzzz" b: "yyyy" c: "xxxx"]

....adds only five words to the total word list (context1, context2, a, b, c)

You can save the space taken by the value assigned to a word, using unset or none, eg:

unset 'context1
context2/a: none

But the name of the word itself is never removed from the global name list.

The good news is .....

The limit was as low as 2048 (plus or minus a few) in earlier versions of REBOL. It has grown in later versions. Recent R2 versions have a limit of 32,000 (ono). R3 is closer to 500,000 and may go higher once it goes into beta.

If you are running on an early version of REBOL and are hitting the unique names of words limit, you really have only two choices:

  • upgrade
  • rejiggle the words you are using so the same name is used in multiple contexts *
Sunanda
Oh great I thought it was still 2000 that's why I was worried, I'm not any more :)
Rebol Tutorial