Overview of The C# Language
Overview of The C# Language
Overview of The C# Language
Sumber: http://en.csharp-online.net/CSharp_Overview
Overview of the C# Language
C# is an object-oriented programming language developed by Microsoft Corporation as part
of their .NET initiative in response to the success of Sun Microsystems' Java programming
language. C# source code—as well as those of other .NET languages—is compiled into an
intermediate byte code called MSIL (Microsoft Intermediate Language. C# is primarily
derived from the C, C++, and Java programming languages with some features of
Microsoft's Visual Basic in the mix.
C# is used to develop applications for the Microsoft .NET environment. .NET offers an
alternative to Java development. Microsoft's Visual Studio .NET development environment
incorporates several different languages including ASP.NET, C#, C++, and J# (Microsoft
Java for .NET), all of which compile to the Common Language Runtime.
C# design goals
According to the Introduction to the Standard ECMA-334 C# Language Specification:
As the definition of C# evolved, the goals used in its design were as follows:
The language, and implementations thereof, should provide support for software engineering principles such
as strong type checking, array checking, detection of attempts to use uninitialized variables, and automatic
garbage collection. Software robustness, durability, and programmer productivity are important.
The language is intended for use in developing software components suitable for deployment in distributed
environments.
Source code portability is very important, as is programmer portability, especially for those programmers
already familiar with C and C++.
C# is intended to be suitable for writing applications for both hosted and embedded systems, ranging from
the very large that use sophisticated operating systems, down to the very small having dedicated functions.
Although C# applications are intended to be economical with regard to memory and processing power
requirements, the language was not intended to compete directly on performance and size with C or
assembly language.
C# 2.0 new language features
New Features in C# 2.0 - twelve "labs" which cover only the new C# 2.0 features.
A new form of iterator employs co-routines via a functional-style yield keyword similar to the one found in
the Python language.
Generics or parameterized types support some features not supported by C++ templates such as type
constraints on generic parameters. However, expressions cannot be used as generic parameters as in C++
templates. In contrast to the Java implementation, parameterized types are first class objects in the virtual
machine, allowing for optimizations and preservation of type information.
Nullable value types facilitate interaction with SQL databases. Sample nullable type declaration:
Partial types allow the separation of a class implementation into more than one source file. This feature was
implemented primarily so Visual Studio generated code can be kept seperate from developer code.
C# 3.0 new language features
C# version 3.0 introduces several language extensions to support higher order, functional
style class libraries. The extensions enable the construction of compositional APIs with the
expressive power of query languages in areas such as relational databases and XML. C# 3.0
will include the following new features:
Anonymous types: tuple types automatically inferred and created from object initializers.
Implicitly typed local variables permit the type of local variables to be inferred from the expressions used to
initialize them.
Implicitly typed arrays: a form of array creation and initialization that infers the element type of the array
from an array initializer.
Extension methods make it possible to extend existing types and constructed types with additional methods.
Lambda expressions: an evolution of anonymous methods providing improved type inference and
conversions to both delegate types and expression trees.
Expression trees permit lambda expressions to be represented as data (expression trees) instead of as code
(delegates).
Query expressions provide a language integrated syntax for queries that is similar to relational and
hierarchical query languages such as SQL and XQuery.
Microsoft C# developers note that C# 3.0 is bytecode compatible with C# version 2.0. For
the most part, enhancements comprise purely syntactic or compile-time improvements. For
example, many of the most common integrated queries can already be implemented using
anonymous delegates in combination with predicate-based container methods such as
List.FindAll and List.RemoveAll.
A Brief History of C#
C# was designed for developing components in a fully object-oriented manner as part of the
Microsoft .NET initiative. C# debuted in the year 2000 at the Professional Developers
Conference (PDC) where Microsoft founder Bill Gates was the keynote speaker. At the same
time, Visual Studio .NET was announced.
The primary architects of C# were Peter Golde, Eric Gunnerson, Anders Hejlsberg, Peter
Sollichy, and Scott Wiltamuth. Of these, the principal designer of the the C# language was
Anders Hejlsberg, a lead architect at Microsoft. Previously, he was a framework designer
with experience with Visual J++ (Microsoft's old version of the Java language), Delphi, and
Turbo Pascal.
Both C# and the Common Language Infrastructure (CLI) have been submitted to
international standards organizations European Computer Manufacturers Association
(ECMA) and International Organization for Standardization (ISO) / International
Electrotechnical Commission (IEC).
The Java Connection
You will find that many C# books and sources ignore or minimize the role of the Java
language in the development of C# and .NET, as if it were all Microsoft's original idea. This
view is prevalent in exclusively Microsoft shops. However, the fact is that Microsoft was a
latecomer to Internet development and the oft cited pedigree of C# from C and C++ applies
equally well to the Java language, which preceded C# by some five years. Microsoft and Sun
Microsystems have a long history of legal struggle over control of the Java language, a battle
which Sun finally won. Prevented from adapting the Java language to the Windows platform,
Microsoft decided to go its own way using its own version of the Java system—namely C#
and .NET. The influence of the Java language on C# and other languages takes nothing away
from C#, which in some ways improves upon its ancestor.
Sejarah
Bill Gates, pendiri Microsoft, memulai bisnis softwarenya dengan mengembangkan
interpreter bahasa Basic untuk Altair 8800, untuk kemudian ia ubah agar dapat berjalan di
atas IBM PC dengan sistem operasi DOS, Perkembangan berikutnya ialah diluncurkannya
BASICA (basic-advanced) untuk DOS, Setelah BASICA, Microsoft meluncurkan Microsoft
QuickBasic dan Microsoft Basic (dikenal juga sebagai Basic Compiler), Visual basic adalah
pengembangan dari bahasa komputer BASIC (Beginner’s All-purpose Symbolic Instruction
Code), Bahasa BASIC diciptakan oleh Professor John Kemeny dan Thomas Eugene Kurtz
dari Perguruan Tinggi Dartmouth pada pertengahan tahun 1960-an (Deitel&Deitel, 1999).
[2]
Bahasa program tersebut tersusun mirip dengan bahasa Inggris yang biasa digunakan oleh
para programer untuk menulis program-program komputer sederhana yang berfungsi sebagai
pembelajaran bagi konsep dasar pemrograman komputer, Sejak saat itu, banyak versi BASIC
yang dikembangkan untuk digunakan pada berbagai platform komputer.[2]Beberapa versinya
seperti Microsoft QBASIC, QUICKBASIC, GWBASIC ,IBM BASICA, Apple BASIC dan
lain-lain, Apple BASIC dikembangkan oleh Steve Wozniak, mantan karyawan Hewlett
Packard dan teman dekat Steve Jobs (pendiri Apple Inc.).[2] Steve Jobs pernah bekerja dengan
Wozniak sebelumnya (mereka membuat game arcade “Breakout” untuk Atari),Mereka
mengumpulkan uang dan bersama-sama merakit PC, dan pada tanggal 1 April 1976 mereka
secara resmi mendirikan perusahaan komputer Apple, Popularitas dan pemakaian BASIC
yang luas dengan berbagai jenis komputer turut berperan dalam mengembangkan dan
memperbaiki bahasa itu sendiri, dan akhirnya berujung pada lahirnya Visual Basic yang
berbasis GUI (Graphic User Interface) bersamaan dengan Microsoft Windows, Pemrograman
Visual Basic begitu mudah bagi pemula dan programer musiman karena ia menghemat waktu
pemrograman dengan tersedianya komponen-komponen siap pakai.[2] Hingga akhirnya Visual
Basic juga telah berkembang menjadi beberapa versi, sampai yang terbaru, yaitu Visual Basic
2008, Bagaimanapun juga Visual Basic 6.0 tetap menjadi versi yang paling populer karena
mudah dalam membuat programnya dan ia tidak menghabiskan banyak Memori (komputer).
[2]
Sejarah BASIC di tangan Microsoft sebagai bahasa yang diinterpretasi (BASICA) dan juga
bahasa yang dikompilasi (BASCOM) membuat Visual Basic diimplementasikan sebagai
gabungan keduanya.[3] Programmer yang menggunakan Visual Basic bisa memilih kode
bahasa pemrograman yang dikompilasi atau kode yang harus bahasa pemrograman yang
diinterpretasikan sebagai hasil Porting dari kode VB.[3]Sayangnya, meskipun sudah
terkompilasi jadi bahasa mesin, DLL bernama MSVBVMxx.DLL tetap dibutuhkan, Namun
karakteristik bahasa terkompilasi tetap muncul (ia lebih cepat dari kalau kita pakai mode
terinterpretasi).[3]