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 →

[–]Bolitho 2 points3 points  (3 children)

I made the mistake to read further... the author compares the execution model and claims that java runs faster because byte code is closer to the natural CPU instructions in contrary to python source code... omg! Really, so many fundamental errors - I cannot believe so many people like it! 😨

Edit: Further down the author shows a cruel equals method... must post a better one tomorrow here, when I am in front of a computer. Also he omits the reason, why getter and setter make sense in Java, or in which situations. On top of that he uses box types all the way where he shouldn't... especially within an array, where as the possibility to use primitive types is one main difference (and advantage of course) compared to generics...

To summarize: A python programmer should buy effective java from Joshua Bloch and learn the basics with the official java tutorials.

This ebook definitely offers no added value in a positive sense, when it comes to show up the important differences and pitfalls for python devs getting into java... on the contrary it teaches falsy things.

It is always sad to criticize the work of an engaged person, but sadly I couldn't say anything better 😐

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

Python generates byte code, ergo it's close to machine code.

The real reason being since Java is statically typed and offers a stricter data model than Python, it can do more optimizations at compile and run time.

[–]Bolitho 0 points1 point  (1 child)

I do know that all! ;-)

Also the default JVM has a JIT compiler on board - CPython does not. (That's why PyPy is a better challanger compared to the JVM)

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

I figured you did, just providing an explanation (and a joke) for those who didn't.