ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
Re: [TCLCORE] TIP #351: Add Striding Support to lsearch
by Fredderic other posts by this author
Jul 10 2009 11:53PM messages near this date
Re: [TCLCORE] TIP #351: Add Striding Support to lsearch | [TCLCORE] zlib push and fcopy
On Thu, 9 Jul 2009 21:15:45 -0500, 
Peter da Silva <peter@[...].com>  wrote:

>  On 2009-07-09, at 17:03, Lars Hellstr�m wrote:
> > wouldn't you need an -index 0 to specify that you're
> > searching the first element of each group?
>  I'm not sure what the point to a strided search that didn't only  
>  search one index (default 0) of each group. If it's searching the  
>  whole group it's equivalent to a non-strided search followed by a  
>  modulus operation. Perhaps that should have been explicit, it never  
>  occurred to me to do so (too close to the trees, I guess). :)

Normally, when searching a list of sub-lists, each sub-list is matched
against as a string.  Would it not make more sense to act as though the
list had been re-packaged into sub-lists of -stride length?

The modulo effect is trivial, this effect requires significant work.
Perhaps too much to implement, if it requires special case handling (in
which case an implied "-index 0" might be better?).

But if it can be done sanely, I'd think it was by far the more obvious
choice.  Even when -index is used, if the selected item itself is a
sub-list, it is again matched as a string.


-- 
Fredderic

Debian/unstable (LC#384816) on i686 2.6.29-2-686 2009 (up 6 days, 21:02)
Thread:
Peter da Silva
Lars Hellstrom
Peter da Silva
Kieran Elby
Peter da Silva
Fredderic
Fredderic
Donald Arseneau
Fredderic
Donald Arseneau
Donal K. Fellows
Fredderic
Donal K. Fellows
Peter da Silva
Peter da Silva
Lars Hellstrom
Peter da Silva
Kieran Elby
Peter da Silva
Fredderic

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved