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

[REBOL] Re: Cunning use of [], () & {} in R# and in future? Rebol versions?

From: greggirwin:mindspring at: 16-Oct-2003 17:38

Hi Andrew, AM> It occurred to me as I was writing Rebol code, that it's possible to AM> re-use these characters [], () & {}, in useful ways. I've noticed that AM> when I'm writing block!, paren! & string values, I leave white space AM> before and after the [], () & {} characters. It would be nice to have:
>>> X: ["a" "b" "c"]
AM> == ["a" "b" "c"]
>>> X[2]
AM> == "b" AM> In other words, by running the block "hard" against the word, it's like: AM> pick X 2 I'd stick with standard notations. I like the idea that blocks are blocks and not used as another notation. As others have pointed out, we have path notation (which is even more concise than the C/C# notation for accessing array elements). -- Gregg