I was solving a task, and I've forgotten this LIMIT=0 behaviour, and I was expecting to get an empty list. In my opinion this behaviour would be good also. That has some logic.Yes, indeed, this has arguably some logic. It could admittedly have been done this way in the first place. But you could also argue that, in this case, the split function should return the whole string untouched. Is this behavior better or less desirable? I just don't know, and we could probably argue forever on that, couldn't we?
OTOH, why would you use split (and probably fire the regex engine) if you don't want to split your string? It'd be quite useless and pretty inefficient.
Then, of course, as afoken said, the current behavior will not change for backward compatibility reasons. So, my opinion (and yours) is quite irrelevant at this point in time.
In reply to Re: discussion: What should split( /PATTERN/, EXPR, 0 ) return better?
by Laurent_R
in thread discussion: What should split( /PATTERN/, EXPR, 0 ) return better?
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |