Click here to Skip to main content
15,886,110 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: What's wrong with Java? Pin
Cp-Coder4-Mar-21 3:40
Cp-Coder4-Mar-21 3:40 
GeneralRe: What's wrong with Java? Pin
W Balboos, GHB4-Mar-21 3:44
W Balboos, GHB4-Mar-21 3:44 
GeneralRe: What's wrong with Java? Pin
Greg Utas4-Mar-21 3:41
professionalGreg Utas4-Mar-21 3:41 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 3:38
mvePIEBALDconsult4-Mar-21 3:38 
GeneralRe: What's wrong with Java? Pin
#realJSOP4-Mar-21 3:40
mve#realJSOP4-Mar-21 3:40 
GeneralRe: What's wrong with Java? Pin
trønderen4-Mar-21 6:05
trønderen4-Mar-21 6:05 
GeneralRe: What's wrong with Java? Pin
Greg Utas4-Mar-21 3:44
professionalGreg Utas4-Mar-21 3:44 
GeneralRe: What's wrong with Java? PinPopular
trønderen4-Mar-21 6:33
trønderen4-Mar-21 6:33 
In (very) special cases: Sure. In those cases, you might as well go to assembly language.

I learned 30+ years ago that trying to outsmart an optimizing compiler is futile. In my student days, we thought it crazy to write an OS in a "high" level language - but Unix did succeed, and performance was not an issue. So we abandoned assembly. Not entirely; there are cases for assembly because that is the only possible way to get access to certain hardware functions. But going assembly for performance reasons has no place in the third millennium.

Today, the same goes for memory. It is almost as difficult to outsmart automatic memory management by "clever" use of malloc/free as to outsmart a compiler - in particular because you have no insight in actual memory fragmentation. The risk of memory leaks is much larger; too many programmers do not master their own memory use as well as they believe (or, they are not enforcing the programming discipline as they should).

Again: There are (very) extreme cases where the cost of garbage collection is unacceptable. Usually, memory fragmentation is then unacceptable as well. So you manage your objects e.g. in a static array, dimensioned for a worst case. (I was programming one such C solution - malloc was not accepted by our coding standards. C++ new would have been rejected as well, so the case for C++ was not very strong.)

Analogy: When I talk with extreme HiFi buffs, I must admit that 24 bit samples at 96 kHz does have its place, in a professional studio where a sound recording may go through many generations of various processing, mixing etc. for an end result of unknown sample width and frequency. But that is is the studio. It doesn't mean that the music I listen to on my stereo benefits from being in 96/24 format.

Similarly: If you write a physical level driver for a 10 Gbps network interface, you probably cannot tolerate GC delays. But for 99.999% of all code written, GC without memory leaks is a lot better than dubious "private" memory management.
GeneralRe: What's wrong with Java? Pin
Greg Utas4-Mar-21 6:56
professionalGreg Utas4-Mar-21 6:56 
GeneralRe: What's wrong with Java? Pin
Kirk 103898215-Mar-21 17:15
Kirk 103898215-Mar-21 17:15 
GeneralRe: What's wrong with Java? Pin
Greg Utas6-Mar-21 1:23
professionalGreg Utas6-Mar-21 1:23 
GeneralRe: What's wrong with Java? Pin
CodeWraith4-Mar-21 23:23
CodeWraith4-Mar-21 23:23 
GeneralRe: What's wrong with Java? Pin
Mike Hankey4-Mar-21 3:46
mveMike Hankey4-Mar-21 3:46 
GeneralRe: What's wrong with Java? Pin
Cp-Coder4-Mar-21 4:05
Cp-Coder4-Mar-21 4:05 
GeneralRe: What's wrong with Java? Pin
Mike Hankey4-Mar-21 4:12
mveMike Hankey4-Mar-21 4:12 
GeneralRe: What's wrong with Java? Pin
trønderen4-Mar-21 6:34
trønderen4-Mar-21 6:34 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 4:19
mvePIEBALDconsult4-Mar-21 4:19 
GeneralRe: What's wrong with Java? Pin
Mike Hankey4-Mar-21 4:26
mveMike Hankey4-Mar-21 4:26 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 5:14
mvePIEBALDconsult4-Mar-21 5:14 
GeneralRe: What's wrong with Java? Pin
Mike Hankey4-Mar-21 5:18
mveMike Hankey4-Mar-21 5:18 
GeneralRe: What's wrong with Java? Pin
trønderen4-Mar-21 6:03
trønderen4-Mar-21 6:03 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 6:25
mvePIEBALDconsult4-Mar-21 6:25 
GeneralRe: What's wrong with Java? Pin
trønderen4-Mar-21 6:53
trønderen4-Mar-21 6:53 
GeneralRe: What's wrong with Java? Pin
PIEBALDconsult4-Mar-21 7:07
mvePIEBALDconsult4-Mar-21 7:07 
GeneralRe: What's wrong with Java? Pin
Leo564-Mar-21 21:00
Leo564-Mar-21 21:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.