Talk:Comparison of C Sharp and Java: Difference between revisions

Content deleted Content added
MiszaBot I (talk | contribs)
m Archiving 2 thread(s) (older than 90d) to Talk:Comparison of C Sharp and Java/Archive 3.
Line 15:
}}
__TOC__
 
== Platform support ==
 
This section is obviously misleading. Mono does not support all the features that we have added in c# column (e.g. functional programming). This table actually says us that C# is multiplatform language but it is not. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/77.37.180.86|77.37.180.86]] ([[User talk:77.37.180.86|talk]]) 18:11, 20 June 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
 
Functional programming is supported by MS C# or Mono C#. Mono supports C# 4 in full (http://www.mono-project.com/Compatibility). Please remember that this is not a framework comparison, but a comparison of two programming langauges. Functional programming refers to lambdas, closures and the fact that functions are 1st class objects in C# 3+, supported on all platforms. [[User:Useerup|Useerup]] ([[User talk:Useerup|talk]]) 21:56, 23 June 2011 (UTC)
 
I don't believe you can compare C# to Java without including the framework. Because the framework itself supplements what the language does not support. And what is, and is not moved from the language into the framework is of itself a debated topic.
 
Lambda Expressions, however, are an extension to the C# language. Just like Macro's are an extension to the C++ language. Neither are the language, even if they are mingled together like they are.
[[Special:Contributions/173.167.141.1|173.167.141.1]] ([[User talk:173.167.141.1|talk]]) 18:56, 28 July 2011 (UTC)
 
Lambda expressions are part of the C# language spec. It is not an extension to the language any more than the for loop is. As for including "the framework" please see the discussion on this very topic elsewhere on this page. It is a difficult nut to crack because you are of course right that ''some'' language features are complemented or replaced by framework features. But what ''parts'' of the framework should then be used as base for the comparison? java.lang? (yes) java.util? (probably yes, some of it), java.awt? (no!). [[User:Useerup|Useerup]] ([[User talk:Useerup|talk]]) 16:02, 30 July 2011 (UTC)
 
Added Windows Phone to the platforms table.
 
== Value types ==
Line 149 ⟶ 134:
 
'''SlothMcCarty''' that is very well put. However, there exists some "core" libraries or types for both languages which could be considered part of the language. Some are even mentioned in the respective language specs. My feeling is that these should be allowed in regardless of specific syntactical support. For instance, the ''class'' type of Java and the ''Type'' type of C#. As I see it, using the criteria you suggested, we should get rid of the "platforms" table as well as the collections among others. I would suggest a criteria for the rest: Good explanation contrasting the languages should follow each table section. [[User:Useerup|Useerup]] ([[User talk:Useerup|talk]]) 19:01, 14 August 2011 (UTC)
 
== Java unsigned integer type "char"? ==
 
I reverted an edit claiming that the Java <code>char</code> type is an "unsigned 16 bit integer" type. According to the language spec it is an ''integral type'' which as soon as it is used with a numeric operator (such as bitwise shift, -and and -or ) it gets ''promoted'' to an integer. So the <code>char</code> type is not an integer type, neither formally nor practically. It is a separate integral type which is ''convertible'' to integer but is itself not an integer. Please read chapter 5 of the Java Language Specification if in doubt. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/87.50.3.197|87.50.3.197]] ([[User talk:87.50.3.197|talk]]) 21:23, 12 June 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
 
== Type system > Enumerations ==
Line 185 ⟶ 166:
::: I'm concerned that this article contains really a lot of original research, which is maybe inevitable considering the amount of content in it. But I think it has much too many content for its subject. Sticking to valid sources would reduce its content, but improve its quality (and be in line with Wikipedia rules BTW). For now even for programmers its very difficult to read. BTW there is a tendency in this article to explain concepts, but I would prefer to have the explanation in the specific articles about these concepts (example Delegates) rather than in this already overly long comparison article. [[User:Hervegirod|Hervegirod]] ([[User talk:Hervegirod|talk]]) 21:41, 28 August 2011 (UTC)
== Suggest correction to "High-Precision Floating Point" row on the feature table ==
 
Decimal is a fixed-point type. It's the exact opposite of floating point. The only thing they have in common is that they both can have a decimal point in their string representations. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/66.193.1.106|66.193.1.106]] ([[User talk:66.193.1.106|talk]]) 14:15, 7 September 2011 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
:Decimal is a [[Decimal floating point|floating-point]] type. It's modeled as -1<sup>sign</sup> * coefficient * 10<sup>-exponent</sup>. The exponent term determines where the decimal point will be, hence "floating-point." A [[Fixed-point arithmetic|fixed-point]] value is basically an integer with an assumed radix point at a predefined position. [http://msdn.microsoft.com/en-us/library/system.data.sqltypes.sqldecimal.aspx SqlDecimal] is closer to a fixed-point type, but the scale is still adjustable and it doesn't have the performance benefit that you might expect from a true fixed-point type. [[User:Maghnus|Maghnus]] ([[User talk:Maghnus|talk]]) 12:51, 15 September 2011 (UTC)