C# and Java: The Smart Distinctions.
Dominik Gruntz · The Journal of Object Technology · 2002
Part of the new .NET platform from Microsoft is the new programming language C # which was first presented in 1999.In many articles, C # was compared with Java and C++, and its new and novel features were presented and discussed.In this article we do not want to elaborate these language extensions (as e.g.properties, events, attributes, operator overloading, etc.) but rather concentrate on some subtle and almost imperceptible language changes in which C # differs from Java.These language refinements enable the compiler to mark potential problems which are otherwise only found by static analyzer tools (as e.g.lint).Programmers can no longer fall into prominent language trap doors and thus save development and debugging time.We hope, that some of these language enhancements find their way back to the Java language. C # AND ITS ANCESTORSMicrosoft .NET is a platform for software components and web services.The kernel of the .NET framework is the Common Language Runtime (CLR) which can load and execute components and which provides some basic infrastructure as e.g.garbage collection, threading and security support.The components can be implemented in a variety of .NET compliant programming languages and are compiled into the Microsoft Intermediate Language (MSIL), a byte code comparable to Java byte code.The predestinate language to program on the .NET platform is C # , a modern, object-oriented and type safe language which (according to Microsoft evangelists) combines the power and efficiency of C++ with the simplicity of Visual Basic.C # was designed by Anders Hejlsberg [Hejlsberg00], author of Object Pascal and Delphi (for an introduction to C # see e.g.[Wiltamuth00]).Although Microsoft always declared C # as a direct successor of C++, the language has inherited almost all features of Java: garbage collection, byte code, meta information and reflection, single superclassing, interfaces, exceptions, etc.Many authors therefore compared C # with its sibling Java and discussed the new and novel features of C # [Albahari00, Eaddy01, Johnson00, Krikorian01, Kurniawan01, Surveyer00a, Surveyer00b].Among the new features of C # are delegates as a se-