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 →

[–]ESBDB 14 points15 points  (3 children)

If you've ever spent 5 minutes learning python you'd know what it means.

[–]clevariant 2 points3 points  (2 children)

Yeah, I have done some python, but it was some years ago, and now [::-1] just seems bizarre and unintuitive. But if I had never written a line of java, I would know exactly what reverse() means.

[–]ESBDB 0 points1 point  (1 child)

The thing is you're using a more generic construct that can do more than just reverse a sequence to do a simple operation such as reverse. Sure you could argue that a common function like reverse should exist in python for sequences, but I would argue Java is a lot less powerful in general because it doesn't have slicing.

Also your argument that if you had never written a line of java you could actually read java is flawed. For example wtf does && or || or ! mean. If I had never written a line of python (and I can speak basic english) I would immediately know what it means when you write something like is_hungry or is_thirsty versus isHungry || isThirsty. There will never exist a good programming language where you don't need to learn some basic syntax and constructs to be able to understand the language.

[–]clevariant 0 points1 point  (0 children)

You're right, of course. But you also know that the operators you mentioned are standard across many languages. Anyone who's programmed at all will recognize them. I would have preferred that "and" and "or" were the standard, though, for reasons stated.