23.4. Discussion

C# definitely looks like an improved Java. Many of the improvements are useful enough for Java to adopt them (as has been done with Java 1.5). For some of them such as properties and events would require too many changes to the Java language giving C# the advantage of being the newer language. To me, the most profound differences are the type model (of the CLR) supporting user-defined reference and value types, and the attributes that open a whole new range of possibilities for defining and using meta data in the code as opposed to the sometimes overwhelming XML configuration files in the J2EE world.

I tend to agree with Bertrand Meyer (and the Smalltalk and Java people) that dynamic dispatch should be the default in object oriented systems. Otherwise you need to change a base class (and recompile all classes depending on it) whenever you find out that a method needs to be virtual later in the development process.

C#'s delegates are definitely a step forward when compared to Java's inner classes and Eiffel's agents, but are still far away from the convenience of Smalltalk, Python, or the functional languages.