From: Damon C. <da...@tc...> - 2010-05-18 15:37:05
|
> Still, do you have a use-case for the command? Off the top of my head, > I can't recall ever wanting to e.g. remove elements 1, 4, and 9 from a > list. On the contrary. I end up writing a command for this (conveniently, I call it lremove) in just about every program I end up writing. Of course, I use different semantics for what I mean lremove to do. Honestly, I think this TIP doesn't go far enough, but I understand that Donal was only planning to put in a little work to get it going. For whatever is up for debate (with the standard "I'm not a TCT member" caveat), I would rather it operate on the list variable in place and also allow a search of elements as well as pure indexes. For my money, an lremove that can do this: % set list {a b c d} a b c d % lremove -exact list a % puts $list b c d is FAR more valuable. This TIP, while offering something useful, doesn't really offer much for me. I'll still end up writing my own command for all of my apps. I just might be able to use this one under the covers for the actual removal. And I'll have to rename my own commands since they'll now blow away the core command. 0-] C'est la vie. D |