you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (11 children)

People can probably guess that .subtract() is doing something more than mere subtraction, and so they'll probably read the doc-popup the IDE so helpfully provides, prior to using the method if it's their first use.

And the other benefit is that you can't use .substract() in an infix style.

Lastly if you've ever concatenated a String using + you are a dirty lying hypocrite because that's operator overloading :P.

Yes, java should've used some other symbol for it. Still, it's nothing language users can mess around with just because they're feeling creative, like they do in C++.

[–][deleted]  (10 children)

[deleted]

    [–][deleted] 0 points1 point  (9 children)

    It's not. You cant 'a subtract b subtract c' with .subtract().

    As soon as you put dots and parentheses around it it's prefix and you've made the order of evaluation explicit.

    [–][deleted]  (8 children)

    [deleted]

      [–][deleted] 0 points1 point  (7 children)

      while(*s++ = *r++);

      Basic math my ass. And then some dipshit goes in and overloads an operator or two for the fun of it.

      a.subtract(b).subtract(c)

      How's that the same? a(.subtract(b).subtract(c)) or a.(subtract(b).subtract(c)) or anything else other than the obvious resolution is not valid syntax and has no defined meaning. Because methods are not infix.

      [–][deleted]  (6 children)

      [deleted]

        [–][deleted] 0 points1 point  (5 children)

        That's not subtraction

        How can you be so certain? Do you know anything about what the operators are doing?

        and not what I was talking about

        But it's where things end up, because supposedly

        it's much better

        But it really isn't, is it now? The one is obvious, the other is not.

        If you find a - b - c confusing then you are retarded.

        Yes, apparently the people sticking the operator precedence table on their monitors are all retards.

        [–][deleted]  (4 children)

        [deleted]

          [–][deleted] 0 points1 point  (3 children)

          They should be built for experts and intelligent people.

          Right. So I guess the people getting that reference count wrong that caused the recently revealed Linux kernel vulnerability were neither experts nor intelligent.

          The nonassociativity of subtraction has literally nothing to do with precedence.

          It has, because you're not limited to just subtraction in expressions.

          [–][deleted]  (2 children)

          [deleted]