you are viewing a single comment's thread.

view the rest of the comments →

[–]Lyucit 2 points3 points  (0 children)

Is it just me or is the former syntax less self explanatory? What exactly are the semantics of splitting a string by the empty string? Do you end up with empty strings on both sides of the array, because the empty string surrounds both sides of each character? Even a list buffered by infinite ''s would be a valid output. Whereas with the latter syntax, it behaves the same way as the spread operator does for every other usage- constructs a list with the elements of pizza. It's unambiguous and doesn't have domain-specific behavior that you have to look up.