I like this suggestion. David Ashley
On Fri, 2014-10-10 at 20:39 -0400, Rick McGuire wrote: > Yeah, I considered something like that too, but it somehow feels wrong > to me. All of the other loop options are prepositions like TO, BY, > FOR, OVER, WHILE, and UNTIL. Using a noun like supplier just doesn't > fit well with the other options. Maybe we can do something like was > done with USE ARG. This was done this way so that the USE instruction > could be reused for some other type of operation that made sense. How > about combining a preposition with a keyword that identified what we > are iterating over. There's a handy list of prepositions here: > > > https://www.englishclub.com/grammar/prepositions-list.htm > > > FROM is one that is available, so something like > > > do index, item from supplier expr > > > would work, with the supplier indicating what sort of source we're > looking at. This can then be extended to other types of source if we > wish, such as > > > do index, item from array expr > > > or > > > do index, item from map expr > > > We don't need to add anything additional now, but it's would be nice > to go with something that can be expanded on in the future. > > > Rick > > On Fri, Oct 10, 2014 at 7:42 PM, David Ashley > <[email protected]> wrote: > How about > Do index, item supplier .someclass~methods > > with "supplier" being a subkeyword. That makes it very clear > what is > happening. > > David Ashley > > On Fri, 2014-10-10 at 17:39 -0400, Rick McGuire wrote: > > Having just coded about 3 supplier loops today where I ended > up in an > > infinite loop because I forgot to code the next method call > at the end > > of the loop, I'd really like to reopen this for discussion > for > > possible inclusion in 5.0.0. Suppliers as they currently > exists are > > really quite error prone. I really wish they had never been > included. > > Methods like allIndexes and allItems do the job fairly well, > but > > suppliers are there, and we have things in the language that > return > > supplier objects, such as the methods method of Class, so we > have to > > deal with them. > > > > > > The mechanism for implementing this is fairly clearcut, the > big > > problem is the syntax. Unlike the other control-variable > forms (do i > > = t to .... and do i over ...), each iteration of the loop > would need > > to set two variables, one for the index and one for the > item. > > > > > > One possibility is to use commas for the two variables: > > > > > > do index, item over .someclass~methods > > > > > > Two variables would indicate we wish to iterate over a > supplier, so > > the over expression must either evaluate to a supplier > object or to an > > object that supports a supplier method. > > > > > > we could use a different keyword potentially, but I'm having > trouble > > even proposing anything that makes sense to specify two > variables. A > > completely new instruction might work but that seems > unnecessary. > > Anybody else have any other ideas? > > > > > > Rick > > > > > ------------------------------------------------------------------------------ > > Meet PCI DSS 3.0 Compliance Requirements with EventLog > Analyzer > > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI > DSS Reports > > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download > White paper > > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog > Analyzer > > http://p.sf.net/sfu/Zoho > > _______________________________________________ > > Oorexx-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog > Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI > DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White > paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog > Analyzer > http://p.sf.net/sfu/Zoho > _______________________________________________ > Oorexx-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://p.sf.net/sfu/Zoho > _______________________________________________ > Oorexx-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/oorexx-devel ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://p.sf.net/sfu/Zoho _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
