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

[REBOL] Re: Series Index Discussion (Was: Core 2.5.5. Beta)

From: greggirwin:mindspring at: 25-Feb-2003 16:21

Hi Volker, VN> i like the effect of returning 'none when out of series. VN> allows stuff like VN> face/text: any[ pick data index "default string"] VN> but i think the out-of-range trick is a bit hidden. VN> could it make sense to have versions with and without error-checking, VN> 'pick and 'pick? or something, to code more specific? I agree. I just want an easy, and consistent, way to get values out of a series reliably. Most of the time, the current model is great for me. It avoids error handling code in lots of places where it would add bloat, without affecting reliability or robustness, and let's me work without thinking very hard. There are occasions where I have to think about things a bit more (e.g. am I getting NONE because it's out of range or because the value in the series is really NONE, what construct or syntax is best suited to account for that in the current context, etc.). That's often when I want some method of checking the validity of a series index (e.g. INDEX? returns NONE) without having to worry about triggering an error - which of course we can do with a mezzanine or by wrapping it in an ATTEMPT. In any case, I want things that make writing code easier for the general case. -- Gregg