On Thu, Feb 12, 2009 at 6:55 AM, Hans <[email protected]> wrote: > > I have been using parameters without key for some markup sometimes, > because it is short and easy. I never used more than 3 keyless > parameters though, since I forget the sequence if there are too many!
Most/many BoltWire functions can take either named fields or positioned fields. But the trick as you say is remember which position matches which label. > So for a parameter parse function I don't see much sense to dedicate > all numeric keys for a series of keyless parameters. I'd rather keep > the convention that a parameter key is unchanged. But I can see it > would be nice for coding to treat any keyless parameters special, > though as I aid not many would or should be used, to avoid input > confusion. > > So here is a suggestion: > Instead of arg[][n] use arg[#n], i.e. use a special prefix for unkeyed args. > And keep any keys intact, but insisting that a key's first character > is alpha-numeric (to avoid any #key and other non-alphanumeric > prefixes), OR excluding just the # as first key character. Yes this is probably better than using the # for numeric keys. Rather leave all keys as entered, and use #1 for unlabeled positioned fields. However, I'm still leaning toward using the same indexing notation for numeric and unlabeled fields, as I haven't been able to come up with a good illustration of why having separate notations might be important. Can anyone suggest a case where it might? The code is trivial either way. Just I lean toward simpler notation where possible. > Anyway, just some thoughts... Thanks Hans, these are good observations. I appreciate your input, and everyone else's also. Cheers, Dan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BoltWire" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/boltwire?hl=en -~----------~----~----~----~------~----~------~--~---
