Jump to content

Talk:Comparison of C Sharp and Java

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by SineBot (talk | contribs) at 01:58, 10 August 2016 (Signing comment by 71.66.101.171 - ""). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconJava Start‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Java, a collaborative effort to improve the coverage of Java on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
WikiProject iconComputing Start‑class
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.
Note icon
This article has been automatically rated by a bot or other tool because one or more other projects use this class. Please ensure the assessment is correct before removing the |auto= parameter.

Boxing/Unboxing

The following statement in the text seems inaccurate:

   In C#, the primitive types are subtypes of the Object type.

The C# MSDN Reference Documentation from Microsoft says this about primitive types:

   Boxing is the process of converting a value type to the type object or to any interface type implemented by this value type. When the CLR boxes a value type, it wraps the value inside a System.Object and stores it on the managed heap. Unboxing extracts the value type from the object. Boxing is implicit; unboxing is explicit. The concept of boxing and unboxing underlies the C# unified view of the type system in which a value of any type can be treated as an object. 

Which is available at this link: https://msdn.microsoft.com/en-us/library/yz2be5wk.aspx — Preceding unsigned comment added by 71.66.101.171 (talk) 01:57, 10 August 2016 (UTC)[reply]

Page Is Irrelevent

Is Wikipedia in the business of providing competing product comparisons?

These are two proprietary products produced by competing corporations. The features in both products are subject to change based on the owners goals and marketing decisions without public input. Thus many of the details are volitile and the article will quickly go stale. There are already inaccuracies on both sides of the comparison some due to the age of the article and others intended to skew the article.

The features comparison colors the yes and no values green and red respectively. This is an immediate value judgement on the included of featues. Due to this red/green coloring a minority of the tables of features have more red boxes on the C# side than the Java side. A simple glance at this bias reveals an immediate inference that C# is better than Java, despite many of the features that are not in Java are conscious design decision by Sun/Oracle.

It could be said that Microsoft has taken a kitchen sink approach to language design while Sun/Oracle has taken a more measured approach to feature inclusion. This is implied by the discussion about keyword growth in Java vs C#. So, as a common comparing any two languages in computer science, feature count and quality of features are not relevent to language utility, inferiority, or superiority. Thus the red/green coloring is misleading and at times innaccurate.

Finally, the code samples are also misleading. All the code samples as displayed have a greater line count for Java than the 'equivelent' C# implying Java is more verbose. In the article this is true for multiple reasons. The algorithms are different. In the Input/output section the Java example uses buffered IO while the C# sample does not. The Java implementation uses a superfluous File object constructor on both input and output which is not necessary (Constuctors for FileReader and FileWriter exist with a String argument for a file path like C#). Also to make the IO buffered in the C# example would need a call to a BufferedReader and BufferedWriter constructor to bring the number of constructor calls between the two samples equal.

Similarly, the "Pass by Reference" uses style to increase the line count Java sample. First: The swap method adds a line of whitespace after the temporary variable initialization. Second: A three line comment is added above the main method in the Java example. Third: the output line at the end of the main method is split into two lines in the Java example while being syntactically identical. Finally, even more damning the example is chosen to show the differences in C# and Java while casting the Java in a bad light because it "still" has not changed the value of s. Another equally simple example can be chosen where C# does not produce the results expected.

These are just two of the examples of how code that is contended to be "equal" is used to show disadvantages in Java. There are more.

This page should be scrapped and not rewriten for the reasons stated at the top. If not scrapped is should be rewritten to remove biases noted above.

One last note, I make my living writing C# code.

The views expressed in this article are solely the views of the author and not the owner of this IP address.

Seconded - this entire article is clearly VERY biased. EboMike (talk) 20:53, 2 March 2013 (UTC)[reply]
Thirded... While something like this could be useful (and it actually did answer a question I was looking up), it is in no way encyclopedic in nature. Something like this belongs on a tech advice site like stackoverflow, not wikipedia. Potatman (talk) 16:50, 15 March 2013 (UTC)[reply]
Fourthed. It's an unbalanced article, and it appears to be not consistent about trying to compare contemporaneous language specifications, a clear indication of poor research. (It doesn't belong on StackOverflow though; it would be rapidly closed as flamebait.) It's a shame, as a balanced comparison would be a genuinely useful thing, but I get the impression that most people preferring one or the other regard the trade-offs they are making as reasonable (assuming they don't go for outright language partisan fanboyism foolishness). Unfortunately, the proportion of academic — i.e., properly peer reviewed — references used is very small; having more independent voices describing the differences would be helpful here because of the languages' shared history. Or the core language designers from either side; I doubt they'd indulge in the sort of poor scholarship displayed here. 82.42.214.208 (talk) 01:04, 3 October 2013 (UTC)[reply]
My problem with it is that it's full of defensive-sounding language that contributes nothing to the comparison of language features. Things like "Java does not permit pointers or pointer-arithmetic within the Java runtime environment. The Java language designers reasoned that pointers were one of the primary features that enable programmers to inject bugs into their code and chose not to support them." Everything after the first sentence is just someone's attempt to editorialize using the designers' "intent." There is nothing about stating the features of the language that implies a shortcoming, and they have no business in this article.94.135.236.132 (talk) 13:51, 12 March 2015 (UTC)[reply]

I found it very informative though, and filled with useful information — Preceding unsigned comment added by 132.183.102.105 (talk) 23:43, 12 March 2013 (UTC)[reply]

Sure, it may have information in it, but that doesn't change the fact that it is not suitable for Wikipedia in its current form. EboMike (talk) 02:04, 22 March 2013 (UTC)[reply]


Page is very useful - An encylopedia at best is a source of useful knowledge, this page contains a great deal of useful information. In response to arguments that this is irrelevant:

  • These are two proprietary products produced by competing corporations.

Ignoring how C# and Java are open standards, why would this matter? If there was an article on advertising strategies of Coca-Cola and Pepsi it would still be interesting and useful.

  • Many of the details are volitile (sic) and the article will quickly go stale.

That what we know changes is not a reason to never teach. What is the current status of hormone replacement therapy? How about dietary recommendations of sodium levels?

  • Other issues related to colors and verbosity

Someone cleaned these up "try {" in Java versus "try\n\t{" in C#. Variable usage of white space is irrelevant, the reader will know that, ditto with colors.

  • Bias

If information is incorrect or presented in a poor fashion, it should be removed. This is an entirely separate issue. Why in the "Pass by reference" only immutable and basic types are used? String in Java is well known to be immutable while StringBuffer is the corresponding mutable class, in this case it seems that in java all the values are passed by reference. 194.127.8.25 (talk) 13:31, 4 October 2013 (UTC)Marco (talk) 15:04, 4 October 2013 (UTC)[reply]

  • Not Encyclopedic

Admittedly, Britannica probably would not have this article. Britannica is also not as good as wikipedia. This article is a compendium recommending a lot of good information. People need to get things done with computers, C/Java/Python/C++/C#/Haskell are all ways to get stuff done, how do they compare? Many people have found this article useful. — Preceding unsigned comment added by Evolvedmicrobe (talkcontribs) 21:42, 24 May 2013 (UTC)[reply]

Agree, the article is definitely useful and valuable, for programmers and practitioners from both camps who are interested at the differences and connections between the two popular languages. Keep and improve it. -- Softzen (talk) 02:10, 24 February 2015 (UTC)[reply]
Err... Java is an open standard. 68.173.113.106 (talk) 21:01, 21 July 2013 (UTC) (woops, sorry! I thought it was but the oracle google lawsuit made me wonder.[reply]
I agree there really is no point to having articles like this at all. This is something that makes sense for a Gartner or Forrester report but not an encyclopedia. MadScientistX11 (talk) 21:02, 17 December 2013 (UTC)[reply]

Language history and evolution -outright bias

This section is terrible, and terribly unencylopedic. Java comes off as the George Orwell "Animal Farm" of computing, while C# sounds like the tyrant with operational efficiency. I think framing the historical perspective is very important, but it comes off so biased I think deleting it entirely would add to the article. An alternative would be to cut any post-2000 (the debut of C#) reference from the article. Would anyone be opposed to this? Evolvedmicrobe (talk) 04:40, 1 November 2013 (UTC)[reply]

I'm a little tired of seeing accusations of 'bias' here; as far as I can see, the Java section is just sloppy, and the claims made there can be substantiated with references or deleted. However it would be good to avoid creating complete version histories of both and refer to Java version history, Java (software_platform)#History, C Sharp (programming_language)#History, and .NET Framework version history for details instead. Rp (talk) 10:16, 1 November 2013 (UTC)[reply]

Agreed! 132.183.101.106 (talk) 22:04, 1 November 2013 (UTC)[reply]

Agree, the section is removed. -- Softzen (talk) 04:09, 24 February 2015 (UTC)[reply]

Section Language history and evoluton deleted

The previous issue list by other editors:

[relevant?]

The section has been removed, because much of its information is subjective, superfluous, and duplicated elsewhere, e.g. in the C Sharp and Java main articles. -- Softzen (talk) 03:53, 24 February 2015 (UTC)[reply]

Hello fellow Wikipedians,

I have just added archive links to one external link on Comparison of C Sharp and Java. Please take a moment to review my edit. If necessary, add {{cbignore}} after the link to keep me from modifying it. Alternatively, you can add {{nobots|deny=InternetArchiveBot}} to keep me off the page altogether. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true to let others know.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—cyberbot IITalk to my owner:Online 18:30, 7 January 2016 (UTC)[reply]

Hello fellow Wikipedians,

I have just added archive links to 2 external links on Comparison of C Sharp and Java. Please take a moment to review my edit. If necessary, add {{cbignore}} after the link to keep me from modifying it. Alternatively, you can add {{nobots|deny=InternetArchiveBot}} to keep me off the page altogether. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—cyberbot IITalk to my owner:Online 14:54, 28 February 2016 (UTC)[reply]