On 2007-04-10, Carsten Haese <[EMAIL PROTECTED]> wrote: > On 10 Apr 2007 07:31:13 GMT, Antoon Pardon wrote >> On 2007-04-06, Carsten Haese <[EMAIL PROTECTED]> wrote: >> > If you have a use case for tuple.index, please show it to me, and I'll >> > show you what you should be using instead of a tuple. >> >> No wonder no convincing use cases for tuples have shown up. You just >> defined use cases of tuples as unconvincing. > > It's not a definition, it's an observation. I'm simply saying that all use > cases I've seen for tuple.index could be written in a clearer fashion by using > something else. Please prove me wrong by supplying a use case of tuple.index > that can not be improved by rewriting.
No it is a defintion because it states this can be done for every possible case, even cases you have no idea about. > Note that I have proved elsewhere on this thread that any real use case for > tuple.index will involve an operation to explicitly use an index different > from the one obtained by the call to tuple.index(). I'd like to hear your > opinion on this. And what relevance would such a proof have? >> My personal opinion is that lack of use cases are used too much as an >> excuse. Limiting the development of your language to use cases makes >> your language less consistent and so makes your language less easy to >> learn. > > That is your opinion, and you are entitled to your opinion. My opinion is that > adding features that don't have any uses just weigh the language down > unnecessarily, and they distract programmers from finding the best solution to > their problem. Adding the index method to tuples is not adding a feature. It is removing a limitation. Writing an index function in python that works with whatever sequence is dead easy. So if the python core implementation only works with a specific sequence that is putting on unnecessary limitations. >> Of course it also limits the language to what the developers can >> think off. > > Initially, yes, but if enough use cases exist for a feature that the > developers didn't think of, it will be implemented. Which means your language will not be that usefull for a number of things until you have frustrated enough people. -- Antoon Pardon -- http://mail.python.org/mailman/listinfo/python-list