by Kenji · 11y ago · 0 comments
What's your definition of "nobody"? :-)
Actually, many people said it all the time -- especially during 1995/1996 when Java hype was gearing up. It was touted as a selling point in Java books, JavaWorld articles, usenet postings, etc.
Examples:
--Java also implements automatic garbage collection, so you don't have to worry about memory management issues. All of this frees you from having to worry about dangling pointers, invalid pointer references, and memory leaks, so you can spend your time developing the functionality of your programs."[1]
--Programmers can be relatively fearless about dealing with memory because they don’t have to worry about it getting messed up.[2]
--Java also implements automatic garbage collection, so the programmer does not have to worry about memory management issues.[3]
--The entire interaction with memory is worry-free in Java.[4]
The issue of "GC pauses" or "extra memory footprint required for performance" is not mentioned in any of those sources. It's not Java's fault that it's presented this way because every technology is hyped by only listing the advantages and avoiding the talk about disadvantages.
[1]1996 edition of David Flanagan's "Java in a Nutshell" -- https://books.google.com/books?ei=ZDHOVOztD4z8sASIsoKYAg&id=...
(he removed the phrase "don't have to worry about memory management issues" from newer editions of the book: https://books.google.com/books?id=mvzgNSmHEUAC&printsec=fron...)
[2]James Gosling - http://www.cs.dartmouth.edu/~mckeeman/cs118/references/Origi...
(Okay, your quote [4] is actually talking about both, so .. one of four examples fits?)
Wikipedia says: >"[High level languages] may [...] automate (or even hide entirely) significant areas of computing systems (e.g. memory management)" And I think most people who make such claims have read similar statements and simply confuse memory-management with thinking about memory issues. (The distinction is that well defined anyway).
This is also what abstractions are for. Instead of killing your perf by using an unsuitable data structure, implement the same interface, but with a fast implementation. Using linked list for this scenario seems suboptimal.