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

[REBOL] Re: Passing hash keys to functions

From: SunandaDH::aol::com at: 29-Dec-2004 2:47

Carl:
> I'm not sure why Sunanda suggested using strings, but I'm sure there's a
good
> reason - possibly because of the limit to the number of words allowed in > REBOL. Or perhaps for speed reasons. Sunanda?
I assumed -- possibly wrongly -- that using words rather than strings was a coding error. The limit on total words will be one problem with this approach, as you say. (Depending on the version of REBOL here is an upper limit of around 8192 differently spelled words. I'm not sure there is a limit on the number of different words of the same spelling that can exist) Another problem will be if the data was being read from a file. The keys may not all be in a format that easily converts to words -- perhaps they have embedded spaces, or characters that don't allow you to use the word in open code. (Yes, I know a word can have embedded spaces: blk: copy [] append blk to-word "x x" but you'd be adding a lot of extra code to handle words like that. One example: it doesn't lead to blocks you can easily mold and load again) Sunanda.