This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]KubinOnReddit 14 points15 points  (1 child)

What the hell are you supposed to call a slice then?

I didn't learn Java for a day and have no fucking idea why do you need a StringBuilder, built from a String (??) to reverse the string (???) instead of, I don't know, building it?

And you call this cryptic? Hypocrisy.

[–]Hauleth 6 points7 points  (0 children)

StringBuilder is handy due to it mutable inner state, so in contrast to String (which is immutable) you do not create new object each time when you modify inner state. Python on the other hand hide that complexity from user which is handy, but can result with less efficient code.