Contents - Cultural View
Contents - Cultural View
Contents - Cultural View
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Comparison of Java and C Sharp 80<br />
out to unmanaged code. An assembly (program or library) using unsafe code must be compiled with a special switch<br />
and will be marked as such. This enables runtime environments to take special precautions before executing<br />
potentially harmful code.<br />
Runtime environments<br />
Java (the programming language) is designed to execute on the Java platform via the Java Runtime Environment<br />
(JRE). The Java platform includes the Java Virtual Machine (JVM) as well as a common set of libraries. The JRE<br />
was originally designed to support interpreted execution with final compilation as an option. Most JRE environments<br />
execute fully or at least partially compiled, possibly with adaptive optimization. The Java compiler produces Java<br />
bytecode. Upon execution the bytecode is loaded by the Java runtime and either interpreted directly or compiled to<br />
machine instructions and then executed.<br />
C# is designed to execute on the Common Language Runtime (CLR). The CLR is designed to execute fully<br />
compiled code. The C# compiler produces Common Intermediate Language instructions. Upon execution the<br />
runtime loads this code and compiles to machine instructions on the target architecture.<br />
Language history and evolution<br />
Java<br />
Java is older than C# and has built up a large and highly active user base, becoming the lingua franca in many<br />
modern branches of computer science, particularly areas which involve networking. Java dominates programming<br />
courses at high school and college level in the United States, and there are currently more Java than C# books. [21]<br />
Java's maturity and popularity have ensured more third party Java API and libraries (many of them open source) than<br />
C#.<br />
An occasionally voiced criticism [22] of the Java language is that it evolves slowly, lacking some features which<br />
make fashionable programming patterns and methodologies easier. Some critics suggest that the designers of C#<br />
may pander too quickly to current trends in programming, thus lacking focus and simplicity. Java's designers seem to<br />
have taken a more conservative stand on adding major new features to their language syntax than other current<br />
languages, perhaps not wanting to tie the language too tightly with trends which may prove to be dead ends.<br />
These trends have been broken with the Java 5.0 release, which introduced several new major language features: a<br />
foreach construct, autoboxing, methods with variable number of parameters (varargs), enumerated types, generic<br />
types, and annotations. With the exception of Generics, C# included all these features from its beginning, some<br />
under different names. [23] Proposals and specifications for the new features had been worked on in the Java<br />
community for considerable time before they were introduced. Indeed, some had been in gestation since before C#'s<br />
initial release (e.g., work on Generics formally began in May 1999 [24] ) such was the Java community's conservatism<br />
at that time.<br />
Problem-specific language additions to Java have been considered and, for now at least, rejected. This approach,<br />
along with a number of other new languages and technologies that address themselves specifically towards current<br />
programming trends, has sparked a renewed debate within the Java camp about the future direction of the Java<br />
language and whether its 'conservative evolution' is right.<br />
As of 2008 debate continued over the inclusion of closures [25] and properties [26] into the language syntax for Java 7.