Live data from Hacker News

Everything about Java 8

techempower.com

181–182 of 182 posts

Re: Everything about Java 8

#181
post #174

Earlier quoted context omitted.

Your last point actually highlights the problem - it is not more reliable because you are assuming what "+" and " " do.* How is that any different to assuming what add() and multiply() do? In many ways, I’d say the latter is worse, because it’s not immediately obvious from just the function names whether the operation mutates the object it’s called on or returns a new object with the result while the originals remain…

> For + and * operators, someone already decided what the convention should be. If you just make them work like the built-in versions, the semantics are already intuitive to anyone who studied basic arithmetic at school. I think it's exactly this that is misleading - your intuition may not be the same as developers. I think people assume more from "+" than they would from "plus()" and if you don't think about it you…

Fair enough, perhaps calling the article a troll was a little harsh, as I don’t know how the author intended to come across. However, the article did seem to consist of one weak argument after another: an unlikely strawman problem here, a blatant exaggeration there, a quick logical fallacy to tie them all together. I’m afraid I didn’t find it a convincing case at all.

BTW, I meant my final comment to be parsed as (conveniently discards one of the most obvious demonstrations that operator overloading can be useful) (on the basis that anyone making that argument just doesn’t understand). The author didn’t actually explain why that case was “completely different” or what someone who proposed that example didn’t understand so that “their opinions can be discounted”.

In fact, I would suggest that his entire case about built-in operators being unambiguous even though they support multiple types can be annihilated using only the equality operator and the words “floating point”: in C, you still can’t tell whether the expression a==b is reasonable or almost certainly a bug without knowing the types of a and b, which AFAICS is exactly analogous to the problem the author is so keen to attack with operator overloading.

Re: Everything about Java 8

#182

Earlier quoted context omitted.

As a daytime Scala developer who seldom uses Java anymore these changes are nice, but a far cry from what I get in Scala.

The Scala compiler takes so long in comparison to javac though

Javac also takes longer than Turbo Pascal to compile...
Post reply on HN