Reply to post: Re: Friends don't let friends install Java.

Java 9 delayed until Thursday March 23rd, 2017, just after tea-time

Christian Berger

Re: Friends don't let friends install Java.

"Lots and lots of Java."

Yes and that's usually the problem. Java programmers tend to solve problems in over complex ways. When you would usually write a small program to do the job, they write thousands of lines of code, trying to build some grand architecture... which is then lacking crucial features while providing features nobody wants.

Plus there's the problem of incompetent Java programmers. Some programmers seem to assume that Java somehow magically fixes all their problems. A nice example is a project I worked on. Some protocol requires the client to send a 32 bit unsigned integer as a text to a server, that server then responds with that integer. Both times the integer gets sent as a text field in a JSON message. On the first tries we have found out, that it only works approximately 50% of the time. Debugging it, we found that the server responds to numbers above 2147483647 with negative numbers. A classical integer overrun. Java could of course protect you from this, but it doesn't. Integer overflows are even baked into the standard. Modern Pascal, for example, does it differently. It allows you to turn overflow checking on or off. If you turn it on, you get an exception in case of such an error. Overflow checking is much easier to do on the compiler level (it can use the carry flags of the CPU) and takes virtually no time to do. A branch not taken only takes the time to load the opcode from memory... which is usually done in parallel to the other functions. "modern" CPUs will then just "run over" the branch and back track in the rare case that you had an overflow.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon