Talk:Java (programming language)/Archive 3

message: I think the article needs some code examples which go beyond hello world (which often doesn't tell much about a language in most cases). Especially for Java as an object oriented language it seems to pay off to have an example which somehow shows how classes are implemented.
For this reason I reinserted the example deleted by Neilc. Of course we may discuss what kind of a more longish example to include so this is just to be considered as a placeholder for a more longish example. Hirzel 07:37, 24 October 2005 (UTC)
replies: text: But it really is a terrible example, full of errors in terminology and demonstrating nothing useful about the language or OO in general.  Where to begin?  I'm a bit tied up at the moment.  --Nigelj 19:00, 24 October 2005 (UTC)

text: If you insist on keeping it, can you please make it suck less? Because the current version is pretty bad. Neilc 04:15, 25 October 2005 (UTC)

text: I agree with Nigelj and Neilc. The code examples that were recently inserted, removed, and reinserted are rather amateurish ("a void is a function") and are not really representative of the language.  I wouldn't object to a "Hello, world" program (though the proper place for that is Hello world program#Java, and we already got that covered). But the present examples are better suited (after some necessary cleanup) for a "gentle introduction to Java"-type writeup, perhaps on Wikibooks. I'd much prefer to keep code examples to a minimum, unless they serve to illustrate specific language constructs (e.g. the generalized for loop), as opposed to general lessons about object orientation. --MarkSweep✍ 04:49, 25 October 2005 (UTC)
replies: text:  Per this discussion, I've removed the examples again. If someone really does want to keep them, please improve them before just blindly re-adding them to the page (but I tend to agree with User:MarkSweep that an example isn't really needed, on the main article page at least). Neilc 13:14, 26 October 2005 (UTC)
thread_title:  Code examples 

message: I find that all comparisons with C++ give a flawed explanation of the latters workings.
One possible argument against languages such as C++ is the burden of having to perform manual memory management. In C++, memory is allocated by the programmer to create an object, then deallocated to delete the object. If a programmer forgets or is unsure when to deallocate, this can lead to a memory leak, where a program consumes more and more memory without cleaning up after itself. Even worse, if a region of memory is deallocated twice, the program can become unstable and will likely crash.
In C++ there are two different kinds of memory. Memory for automatic objects, which is handled by the language and dynamic memory, which is handled by the programmer. All this requires is a correctly written constructor and destructor method for each class which uses "new".
* Conversely, C++ programmers can become confused with Java because in Java primitives are always automatic variables and objects always reside on the heap, whereas C++ programmers are explicitly given the choice in both cases by means of pointers.
Another common Java mistake. The type of memory and the way to reference it are separate. In Java objects are really pointers which are automatically referenced and primitive types are references. In C++ all types are handled in exactly the same way. You can have pointers point to automatic or dynamic memory and the same for references. Consequently the "by means of pointers" makes non sense.
MarSch 14:21, 27 October 2005 (UTC)
thread_title:  C++? 

message: The summary need more info about what Java is, rather than all this about history and who makes it. Something about what makes Java speical, it's popularity, commons uses,  --Apoc2400 07:09, 9 December 2005 (UTC)
replies: text: I agree. The introduction is terrible. I've removed some of the really obscure trivia ("Oak" was named after a tree outside someone's office) but just about everything else that's in the introduction (i.e. everything after "Java is an object-oriented programming language ..." down to "shares a similar C-like syntax." should be moved out of the intro and replaced by a brief explanation of what Java actually is, where it's used and why it's significant. --Lee Hunter 01:08, 18 December 2005 (UTC)
thread_title:  Introduction is not very good 

message: In the Criticisms:Performance Impacts section, it is mentioned that Garbage Collection 'unaviodalbly harms performance and memory usage' which is not neccesarily the case. Often, for large data sets with many small elements GC can dominate conventional malloc/free implementations, and in other cases can be comparable. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/#details for details on a popular C implementation of a garbage collection. On the other hand the Language characteristics:Automatic Garbage collection section is very accuarte and independent. - Chris Marcellino
: In fact, the simple experiment of doing free(malloc(10)); in a tight loop in C or C++ and the equivalent Java loop show GC to outperform usual implementations of free/malloc by a factor of ten. In Sun JDK allocation is about 10 machine instructions and deallocation is (almost) zero instructions since GC does not touch garbage. The life time of objects may affect this rather simplistic measurement, though, due to generational GC. I suspect it could be hard to comment on this in the article without getting in trouble with some people. This is somewhat speculative, but the assertion that 'GC is unavoidably slow' is even more speculative (dare I say provably false, as per the experiment I mention). Weregerbil 01:27, 16 January 2006 (UTC)
thread_title:  Performance Impacts 

message: Patrick Naughton claimed, in a Forbes magazine article he wrote, to have started the Java project (linked from his Wiki bio).  Should that be mentioned in this article?
-- Brianhe 07:46, 17 December 2005 (UTC)
thread_title:  Inventors 

message: Is Java open source? Under what license is Java distributed? C for example is an international standard, therefore everybody is allowed to develop an own C compiler/linker/IDE. What about Java in this context? --Abdull 13:50, 17 December 2005 (UTC)
replies: text: If memory serves, the Java standard is open; Sun's Java virtual machine implimentation is not. Raul654 16:28, 17 December 2005 (UTC)
thread_title:  Java license 

message: Reverted to deal with vandalism. DCrazy 22:01, 17 December 2005 (UTC)
thread_title:  Vandalism 

message: Added TOCleft (article is hard to read otherwise on <= 1024x768). —Preceding unsigned comment added by 144.126.130.139 (talk • contribs) 08:41, 18 December 2005
: I am the anon above.  Why was the  reverted?  Not everyone runs at 1280x1024. --DCrazy talk/contrib 17:11, 18 December 2005 (UTC)
thread_title:  TOCleft 

message: The introduction states that Java is a variant of C++ with a "more robust runtime environment."  As far as I know, C++ has no runtime environment except the operating system itself, which the JVM also runs on top of.  Can we fix this little erratum? --Duke 71.198.170.40 21:26, 20 December 2005 (UTC)
thread_title:  "more robust runtime environment"? 

message: Should Microsoft .NET, a software platform, be listed under Influenced in the info box?  I added C#, which is the real influence of the Java language.  .NET should be listed as a software platform influenced by the Java platform, not the language. I left .NET in the info box for now, but unless there are objections, I intend to remove it. -- Doug Bell 18:40, 10 January 2006 (UTC)
replies: text: .NET is more comparable to (and competes with) J2EE.  I agree with your removal. Ohnoitsjamie 18:42, 10 January 2006 (UTC)

text: My impression of what influenced what is: Java => C#, J2EE => .NET, JVM => CLR, Java byte code => IL code; I was considering removing it also. --Flash 02:29, 11 January 2006 (UTC)
replies: text:  Removed .NET from Influenced, added Objective C to Influenced by.-- Doug Bell talk/contrib 19:21, 11 January 2006 (UTC)
thread_title:  Should platforms be listed in Infobox? 

message: The first bullet under criticisms is:
Not all projects or environments require enterprise-level complexity, such as stand-alone websites or sole-proprietorship programmers. Such individuals find Java's self-enforcing complexity management to be overkill.
What exactly does self-enforcing complexity management mean?  If this is referring to Java EE, it belongs in a different article. I think this statement needs to be clarified or removed. – Doug Bell (talk/contrib) 21:20, 17 January 2006 (UTC)
thread_title:  Self-enforcing complexity management? 

message: I created a subpage, User:Flash200/Programming-language outline, for describing and discussing the content reorganizing I've been doing in the past couple weeks for a number of programming-language articles. I recently tried moving the Java history much farther down in the article, but quickly reverted the change because of feedback from a couple users.
Recently, someone changed the Python article, putting the philosophy at the beginning of the article with the commentary, "Put philosophy before history (what it IS is more important than how it got there)." So far no one has objected to that particular change, and it made sense to me. Would anyone object to placing history immediately after philosophy for the Java article, or for other programming articles in general? Please feel free to comment either here, on the subpage, or on my talk page (one user has already commented on my talk page). --Flash 23:38, 18 January 2006 (UTC)
replies: text: Also see User:Dysprosia#location_of_the_history_section. —Ruud 23:44, 18 January 2006 (UTC)

text: In almost all cases, history should be before anything else. It is important for framing the article properly. Dysprosia 04:08, 19 January 2006 (UTC)

text: I started out writing a response here in favor of putting philosophy first based on the argument that the history is rarely succinct, whereas philosophy should be.  However, examining the article on Java convinced me that my argument didn't hold.  The philosophy is definitely a more in-depth discussion of Java and less likely to be accessible to a lay reader.  So now I've gone 180° before even presenting my case. – Doug Bell talk•contrib 05:24, 19 January 2006 (UTC)
thread_title:  Organizing content 

message: I realize this article is already too long, and we should be discussing splitting parts off (see #Moving sections on Syntax and Resources out to child articles), but nevertheless I think that the Java 2 Platform, Standard Edition article should be merged here.  The difference between the Java language and the Java platform is hopelessly blurred.  You can't discuss the language in abscence of the libraries in any meaningful way.
Consider that java.lang contains classes that are central to the language.  The article on the language already has significant discussion of the libraries.  The sections in the Java SE article that list and summarize the packages are better served by the Javadoc API documentation.  (Compare  to the list of packages in the article—the article is nearly a complete subset.)  The only really relevant thing that needs to be discussed regarding the platform is to describe the distinction between the platform and the language and explain what constitutes the platform.  I suspect that can be accomplished in a paragraph. – Doug Bell talk•contrib 11:19, 20 January 2006 (UTC)
replies: text: Actually, what makes sense is to merge to Java 2 Platform, Standard Edition to Java platform so I've moved the discussion there. – Doug Bell talk•contrib 18:34, 20 January 2006 (UTC)
thread_title:  Merge from [[Java 2 Platform, Standard Edition]]