Hacker News new | ask | show | jobs
by notyourwork 2340 days ago
What about java?
1 comments

Java allows you to do some small errors in its complex classes and works around them silently however, this causes performance impacts.

These performance penalty get really magnified when a lot of small errors are done on a less powerful hardware.

I've found out this the hard way when I was developing Java GUI (Swing mostly) apps, and messed up the initialization sequence of the GUI a few times.

While I ses you've been downvoted, I am really curious why do you believe that? Do you have an actual, concrete example?

FWIW, it would be very weird, since Java is strongly typed, and while you can introduce bugs, not any more so than in any other, esp dynamically typed languages.

I've written quite a few Java Swing applications during the years after graduating and getting my MSc (approximately 3 years).

There's always a standard procedure to get a Swing main window running. IIRC you get the window, the canvas (layout?), layout manager then, you create and push your elements into the layout, fiddle with them, and lastly, set your window visible.

You can flex the process between getting the window and starting to push your elements into the layout. You can make Java implicitly create the missing parts without connecting to a variable.

If you do that, everything works as expected but, with a slight performance penalty. Everything will be ever slightly laggy. On the other hand, if you do everything by book, things run smoother. I experienced this with the apps I've written.

Some people believed me, some people don't. Some believed me after I showed the situation to them. This effect diminished in AMD64 era, and became unnoticeable after Intel Core series processors came to existence.

It was Java 6 times, so I'm not sure whether it's applicable.

That's the little lesson I've learned during developing with Java: Pay attention, do once, do right.