Ok, then we simply have different opinions on that one.
I otoh think it's a bit ugly to graft filtering functionality into copy_value; it seems arbitrary that such a generic function should handle ranges which isn't even applicable for many of the types it supports. It could just as well take an array of specific indices to copy, or a parameter to match prefixes on strings to copy, or something like that.
Adding a level parameter to copy_value sounds like a really good suggestion, though.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-03-06 12:54: Subject: negative indices in array ranges
I'm still not talking about saving it for future use, I explained my reasons why I don't think "range" is a fitting name.
To put it in clear text: I don't think "range" fits what the function does.
In my opinion, reusing copy_value sounds like a much better idea. Changing it's name to "copy" sounds like a great idea.
Did anyone do any with the old suggestion of making the number of levels copied by copy_value a parameter?
/ Mirar