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

[REBOL] Order of arguments to common words

From: rebol::keithdevens::com at: 2-Aug-2000 16:16

Hi, I'm just wondering why this design choice was made: for pretty much any word that finds or picks, etc. a location out of a series, for example: print find "here and now" "and" blk: [red 123 green 456 blue 789] print select blk 'red 123 str: "REBOL" print pick str 2 E (all examples from the dictionary) the series is the first argument, and the index or the thing to find is the second argument. I'm just wondering why this is, because it seems like this makes it more confusing to string them together. For instance, with the way it is now, you would write something like: "skip skip [a b c d e] 2 2", which to make clearer with parentheses would be (skip (skip [a b c d e] 2) 2). How come it was chosen for it to be this way rather than being able to do "skip 2 skip 2 [a b c d e]", if the arguments were reversed? Just looking for some insight :) Thanks! Keith