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

Content deleted Content added
Useerup (talk | contribs)
Line 365:
[[User:Deltafox1229|Deltafox1229]] ([[User talk:Deltafox1229|talk]]) 00:19, 5 December 2010 (UTC)
: The problem with this article is that some people have a tendency to put a "Not Supported" for Java for a feature which is supported differently in C# and Java, in the cases where Java and C# does them very differently. I'm not blaming them, because there are no standardized notions of what an object oriented language would have to be. [[User:Hervegirod|Hervegirod]] ([[User talk:Hervegirod|talk]]) 13:26, 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)