27 Feb
2011
27 Feb
'11
11:50 p.m.
On Mon, Feb 28, 2011 at 8:18 AM, Mart Sõmermaa <mrts.pydev@gmail.com> wrote:
Knowing that reasoning and the inconvenient special casing that it causes in actual code, would you still design split() as ''.split('b') == [''] today?
No, but that isn't really the question we need to ask. The more important question is, given that it *does* behave this way now, is changing it worth the inevitable hassle? How would we get there from here without gratuitously breaking working programs? So, even though I agree that Ruby's semantics are probably better in this case, I don't see it as sufficiently important to justify the breakage involved in fixing it. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia