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

Content deleted Content added
Line 367:
::No, the problem is that too many people are confused about what exactly is Java. They come here an fail to realize that there is something more basic than what they use every day. Java is both a language and a platform. This distinction is much more clear with C#/.NET because they have different names. You have Java developers who want to turn this into a comparison of IIS versus Tomcat. I kid you not. You can actually use Java without the BCL, as you can use C# without the BCL. It doesn't help that some contributors edit from a biased perspective and fail to properly investigate claims about the language they are biased against. Case in point: The value type discussion above. [[User:Useerup|Useerup]] ([[User talk:Useerup|talk]]) 13:43, 5 December 2010 (UTC)
:Java ''the language'' has as much event handling as it has properties: Events are modelled in the corresponding framework built ''upon'' Java (the language), in much the same way as "properties" are built through methods for getting and setting. Contrast that with C# which has first-class support for ''event members''. You can model an event (observer/observable) pattern in any object oriented language which makes this point rather moot. With you edit it look like the two languages are the same in this respect, which they are not: Java only has an event model in the corresponding BCL and only by convention. C# has a direct event feature based on delegates. This highlights previous discussions as to how much of the BCLs should be included in the comparison. If this article is about the ''languages'', clearly Java does not feature events. If this article is about the languages and *some* of the BCL's, yes then Java does have an implementation of the observer pattern. This is still about the ''languages'' (other articles compare the frameworks/BCLs) so, this should be changed to a "no; but an standard implementation of the observable pattern is encouraged through the BCL". That way we can keep this about the languages and still point out that of course you can do event programming with Java. [[User:Useerup|Useerup]] ([[User talk:Useerup|talk]]) 13:31, 5 December 2010 (UTC)
:: Java has not just event's handling by convention. For example, all AWT and components event's are hard-wired to Java events at a very low level of the JVM / Java library. You do not have to do any specific wiring to use them. It's different for the Observer pattern IMO, because it is just a pattern that you can or not choose to use. Events are there, you can't say in java (or it will be incredibly hard), no I will use another way to handle events that what Java already has. same as for C#. [[User:Hervegirod|Hervegirod]] ([[User talk:Hervegirod|talk]]) 13:46, 5 December 2010 (UTC)