Talk:Heap pollution

Latest comment: 5 years ago by Mhoskins in topic This is completely incomprehensible

This is completely incomprehensible

edit

The article does not define the term "heap pollution". It does not assert notability. It does not explain whether the problem is actually specific to Java or whether it has wider applicability--Dfeuer (talk) 05:21, 15 July 2014 (UTC)Reply

Not only is this article fairly terrible at explaining an incredibly narrow definition of a concept unique to this programming language, the topic itself is barely notable outside of Java programming. In fact, the entire concept can be explained in a (fairly short) Stack Overflow answer: https://stackoverflow.com/a/12462259 I would almost venture that this article should *still* be a candidate for deletion. Mhoskins (talk) 20:41, 9 October 2019 (UTC)Reply

This is less incomprehensible, but still needs work

edit

An explanation of why the term "heap pollution" is used for the situation it describes would be very helpful. --Dfeuer (talk) 05:05, 16 July 2014 (UTC)Reply

I'm afraid an explanation might be seen as original research, since Oracle who probably introduced the term didn't explicitly give a reason for calling it that, but I believe it is called heap pollution because you have a heap of parametrized objects that due to several possible reasons has become polluted with objects of a non-parametrized type, and this causes problems because when you have a parametrized variable referring to objects in that heap it will come across these nonparametrized objects and not know what to do with them. I am afraid though that I am unfamiliar with Java and haven't dabbled in it for ages because, frankly, C++ is a better language, but the term was first introduced when discussing Java and I believe there are problems specific to it in Java. I agree the article is confusing, but someone more familiar with Java than I will have to clear it up.AioftheStorm (talk) 18:53, 16 July 2014 (UTC)Reply