C Sharp (bahasa pemrograman): Perbedaan antara revisi
Konten dihapus Konten ditambahkan
k pembenahan |
Tag: Suntingan perangkat seluler Suntingan peramban seluler Suntingan seluler lanjutan |
||
(66 revisi perantara oleh 29 pengguna tidak ditampilkan) | |||
Baris 1:
{{Correct title|title=C#|reason=#}}
{{Infobox programming language
| name = C#
| logo = C Sharp Icon.png
| logo size = 150px
| paradigm = [[Pemrograman terstruktur|Terstruktur]], [[Pemrograman imperatif|imperatif]], [[Pemrograman berorientasi objek|berorientasi objek]], [[Pemrograman berbasis kejadian|berbasis kejadian]], [[The Task-based Asynchronous Pattern|task-driven]], [[Pemrograman fungsional|fungsional]], [[Pemrogaman generic|generic]], [[Pemrograman reflektif|reflektif]], [[Komputasi bersamaan|bersamaan]]
| family = [[C (bahasa pemrograman)|C]]
| year = {{start date and age|2000}}<ref>{{Cite web | url=https://www.infoq.com/minibooks/emag-c-sharp-preview |title = InfoQ eMag: A Preview of C# 7}}</ref>
| designer = [[Anders Hejlsberg]] ([[Microsoft]])
| developer = Mads Torgersen (Microsoft)
| latest release version = {{wikidata|property|edit|reference|P548=Q2804309|P348}}
| latest release date = {{start date and age|{{wikidata|qualifier|single|P548=Q2804309|P348|P577}}}}
| latest preview version = {{wikidata|property|edit|reference|P548=Q3295609|P348}}
| latest preview date = {{start date|{{wikidata|qualifier|single|P548=Q3295609|P348|P577}}}}
| typing = Statis, dinamis,<ref name="dynamic" /> kuat, aman, nominatif, diinferens sebagian
| implementations = [[Microsoft Visual C Sharp|Visual C#]], [[.NET Framework]], [[Mono (perangkat lunak)|Mono]], [[.NET Core]], [[DotGNU|DotGNU (dihentikan)]], [[Universal Windows Platform]], [[Blazor]]
| dialects = [[Cω]], [[Spec Sharp|Spec#]], [[Polyphonic C Sharp|Polyphonic C#]], [http://ecsharp.net Enhanced C#]
| influenced_by = [[C++]],<ref name="influenced by CPP" /> [[Cω]], [[Eiffel (bahasa pemrograman)|Eiffel]], [[F Sharp|F#]],{{efn|untuk async}} [[Haskell]], [[Icon (bahasa pemrograman)|Icon]], [[J Sharp|J#]], [[Visual J++|J++]], [[Java]],<ref name="influenced by CPP" /> [[ML (bahasa pemrograman)|ML]], [[Modula-3]], [[Object Pascal]]<ref name="influenced by op" />
| influenced = [[Chapel (bahasa pemrograman)|Chapel]],<ref name="chplspec">{{cite web|title=Chapel spec (Acknowlegements)|url=http://chapel.cray.com/spec/spec-0.98.pdf|date=2015-10-01|accessdate=2016-01-14|publisher=Cray Inc}}</ref> [[Clojure]],<ref>{{cite web |url=http://www.codequarterly.com/2011/rich-hickey|archive-url=https://web.archive.org/web/20170111184835/http://www.codequarterly.com/2011/rich-hickey|url-status=dead|archive-date=2017-01-11|title=Rich Hickey Q&A by Michael Fogus|access-date=2017-01-11}}</ref> [[Crystal (bahasa pemrograman)|Crystal]],<ref name="rel_0.18.0">
{{cite web
| url = http://crystal-lang.org/2016/06/14/crystal-0.18.0-released.html#comment-2732771703
| title = Crystal 0.18.0 released!
| last = Borenszweig
| first = Ary
| quote = It's heavily inspired by Ruby, and other languages (like C#, Go and Python).
}}
</ref> [[D (bahasa pemrograman)|D]], [[J Sharp|J#]], [[Dart (bahasa pemrograman)|Dart]],<ref>{{cite web|title=Web Languages and VMs: Fast Code is Always in Fashion. (V8, Dart) - Google I/O 2013|url=https://www.youtube.com/watch?v=huawCRlo9H4&t=30m10s|accessdate=22 December 2013}}</ref> [[F Sharp|F#]], [[Hack (bahasa pemrograman)|Hack]], [[Java]],<ref>Java 5.0 menambahkan beberapa fitur bahasa baru ([[foreach loop|enhanced for loop]], [[Tipe objek (pemrograman berorientasi objek)#Autoboxing|autoboxing]], [[variadic function|varargs]] dan [[Anotasi Java|anotasi]]), setelah mereka diperkenalkan di bahasa C# yang mirip dan bersaingan [http://www.barrycornelius.com/papers/java5/] [http://www.levenez.com/lang/]</ref><ref name="influenced" /> [[Kotlin]], [[Nemerle]], [[Oxygene (bahasa pemrograman)|Oxygene]], Ring,<ref name="Ring programming language and other languages">{{cite web |url=http://ring-lang.sourceforge.net/doc1.6/introduction.html#ring-and-other-languages |title=Ring programming language and other languages |author=Ring Team |date=5 December 2017 |work=ring-lang.net |publisher=[[ring-lang]]}}</ref> [[Rust (bahasa pemrograman)|Rust]], [[Swift (bahasa pemrograman)|Swift]],<ref name="lattner2014">{{cite web|url=http://nondot.org/sabre/|title=Chris Lattner's Homepage|last=Lattner|first=Chris|date=2014-06-03|accessdate=2020-05-12|publisher=Chris Lattner|quote=The Swift language is the product of tireless effort from a team of language experts, documentation gurus, compiler optimization ninjas, and an incredibly important internal dogfooding group who provided feedback to help refine and battle-test ideas. Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list.}}</ref> [[Vala (bahasa pemrograman)|Vala]], [[TypeScript]]
| platform = [[Common Language Infrastructure]]
| license = Kompilator [[Roslyn (kompilator)|Roslyn]]: [[MIT License|MIT/X11]]<ref name="auto">{{Cite web|url=https://github.com/dotnet/roslyn|title=The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.: dotnet/roslyn|date=November 13, 2019|via=GitHub}}</ref><br/>
[[.NET Core|.NET Core CLR]]: [[MIT License|MIT/X11]]<ref>{{Cite web|url=https://github.com/dotnet/coreclr|title=CoreCLR is the runtime for .NET Core. It includes the garbage collector, JIT compiler, primitive data types and low-level classes.: dotnet/coreclr|date=November 13, 2019|via=GitHub}}</ref>
Kompilator [[Mono (perangkat lunak)|Mono]]: [[GPLv3]] dan MIT/X11<br/>
[[DotGNU]]: [[GPL]] dan [[LGPL]]
| file_ext = <code>.cs</code>
| website = {{URL|http://csharp.net}}
| wikibooks = C Sharp
| versions = Lihat [[#Versi|§ Versi]]
}}
'''C#''' (dibaca: '''''see sharp''''') adalah sebuah [[bahasa pemrograman]] [[Pemrograman Berorientasi Objek|berorientasi objek (''object-oriented language'')]] yang dikembangkan oleh [[Microsoft]] sebagai bagian dari inisiatif kerangka [[Microsoft .NET|.NET Framework]]. Bahasa pemrograman ini dibuat berbasiskan bahasa [[C++]] yang telah dipengaruhi oleh aspek-aspek ataupun fitur bahasa yang terdapat pada bahasa-bahasa pemrograman lainnya seperti [[Java]], [[Delphi]], [[Visual Basic]], dan lain-lain dengan beberapa penyederhanaan. Menurut standar ''[http://www.ecma-international.org/publications/standards/Ecma-334.htm ECMA-334 C# Language Specification]'', nama C# terdiri atas sebuah huruf Latin '''[[C]]''' ([[Unicode|U+0043]]) yang diikuti oleh tanda pagar yang menandakan angka '''#''' ([[Unicode|U+0023]]). Tanda pagar # yang digunakan memang bukan tanda kres dalam seni musik (U+266F), dan tanda pagar # (U+0023) tersebut digunakan karena karakter kres dalam seni musik tidak terdapat di dalam [[papan tombol]] standar.
== Tujuan desain ==
Standar European Computer Manufacturer Association (ECMA) mendaftarkan beberapa tujuan desain dari bahasa pemrograman C#, sebagai berikut:
* Bahasa pemrograman C# dibuat sebagai bahasa pemrograman yang bersifat ''
* Bahasa pemrograman C# ditujukan untuk digunakan dalam mengembangkan komponen perangkat lunak yang mampu mengambil keuntungan dari lingkungan [[komputasi terdistribusi|terdistribusi]].
* Portabilitas
* Dukungan untuk internasionalisasi (multi-language) juga sangat penting.
* C# ditujukan agar cocok digunakan untuk menulis [[program aplikasi]] baik dalam sistem [[klien-server]] (''hosted system'') maupun [[sistem
* Meskipun aplikasi C# ditujukan agar bersifat 'ekonomis' dalam hal kebutuhan pemrosesan dan [[memori|memori komputer]], bahasa C# tidak ditujukan untuk bersaing secara langsung dengan kinerja dan ukuran perangkat lunak yang dibuat dengan menggunakan bahasa pemrograman C dan [[bahasa rakitan]].
* Bahasa C# harus mencakup pengecekan jenis (''type checking'') yang kuat, pengecekan larik (''[[array]]''), pendeteksian terhadap percobaan terhadap penggunaan [[Variabel]]-variabel yang belum diinisialisasikan, portabilitas [[kode sumber]], dan pengumpulan sampah (''[[pengumpulan sampah (ilmu komputer)|garbage collection]]'') secara otomatis.
== Sejarah ==
Pada akhir dekade 1990-an, [[Microsoft]] membuat program Microsoft Visual J++ sebagai sebuah langkah percobaan untuk menggunakan [[Java]] di dalam sistem operasi Windows untuk meningkatkan antarmuka dari Microsoft
Pengalaman Helsberg sebelumnya dalam pendesain bahasa pemrograman seperti
C#
Agar mampu mempromosikan penggunaan besar-besaran dari bahasa C#, Microsoft, dengan dukungan dari [[Intel Corporation]] dan [[Hewlett-Packard]], mencoba mengajukan
== Fitur-fitur bahasa ==
C#
<!--
===Sistem [[tipe data]] yang padu===
Bahasa C# memiliki tipe data yang padu (unified type system). Ini berarti, semua tipe data, termasuk tipe data primitif seperti halnya integer (bilangan bulat) merupakan anak kelas dari kelas System.Object. Sebagai contoh, setiap tipe data memiliki metode ToString(). Untuk alasan kinerja, tipe-tipe data primitif (dan tipe-tipe nilai pada umumnya) dialokasikan secara internal di dalam ''[[stack]]''.
C# has a unified type system. This means that all types, including primitives such as integers, are subclasses of the System.Object class. For example, every type inherits a ToString() method. For performance reasons, primitive types (and value types in general) are internally allocated on the stack. Boxing and unboxing allow one to translate primitive data to and from their object form. Effectively, this makes the primitive types a subtype of the Object type. Primitive types can also define methods (e.g., 42.ToString() calls the ToString() method on an integer), and in the programmer's perspective behave like any other object.
C# allows the programmer to create user-defined value types, using the struct keyword. From the programmer's perspective, they can be seen as lightweight classes. Unlike regular classes, and like the standard primitives, such value types are allocated on the stack rather than on the heap. They can also be part of an object (either as a field or boxed), or stored in an array, without the memory indirection that normally exists for class types. Structs also come with a number of limitations. Because structs have no notion of a null value and can be used in arrays without initialization, they are implicitly initialized to default values (normally by filling the struct memory space with zeroes, but the programmer can specify explicit default values to override this). The programmer can define additional constructors with one or more arguments. This also means that structs lack a virtual method table, and because of that (and the fixed memory footprint), they cannot allow inheritance (but can implement interfaces).
-->
== Catatan ==
{{notelist}}
== Referensi ==
{{reflist|30em|refs=
<ref name="dynamic">{{cite web |url = http://code.msdn.microsoft.com/csharpfuture/Release/ProjectReleases.aspx?ReleaseId=1686 |title = New features in C# 4.0 |first = Mads |last = Torgersen |date = October 27, 2008 |publisher = [[Microsoft]] |accessdate = October 28, 2008 }}</ref>
<ref name="influenced by CPP">{{cite journal |last = Naugler |first = David |date=May 2007 |title = C# 2.0 for C++ and Java programmer: conference workshop |journal = Journal of Computing Sciences in Colleges |volume = 22 |issue = 5 |quote = Although C# has been strongly influenced by Java it has also been strongly influenced by C++ and is best viewed as a descendant of both C++ and Java.}}</ref>
<ref name="influenced by op">{{cite magazine |url = http://www.computerworld.com.au/article/261958/a-z_programming_languages_c_/?pp=7 |title = The A-Z of Programming Languages: C# |date = October 1, 2008 |magazine = [[Computerworld]] |first = Naomi |last = Hamilton |accessdate = February 12, 2010 |quote = We all stand on the shoulders of giants here and every language builds on what went before it so we owe a lot to C, C++, Java, Delphi, all of these other things that came before us. ([[Anders Hejlsberg]]) |archive-date = 2010-03-24 |archive-url = https://web.archive.org/web/20100324124903/http://www.computerworld.com.au/article/261958/a-z_programming_languages_c_/?pp=7 |dead-url = yes }}</ref>
<ref name="influenced">{{cite web |url = http://www.barrycornelius.com/papers/java5/onefile/ |title = Java 5 catches up with C# |date = December 1, 2005 |publisher = [[University of Oxford]] Computing Services |first = Barry |last = Cornelius |accessdate = June 18, 2014 |quote = In my opinion, it is C# that has caused these radical changes to the Java language. ([[Barry Cornelius]]) }}</ref>
}}
== Pranala luar ==
* {{en}} [http://msdn.microsoft.com/vcsharp/team/language/default.aspx Bahasa C#
* {{en}} [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csspec/html/CSharpSpecStart.asp Spesifikasi C#
* {{en}} [http://www.ecma-international.org/publications/files/ecma-st/ECMA-334.pdf Spesifikasi bahasa ECMA-334 C#
* {{en}} [http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=36768 Spesifikasi bahasa ISO C#
* {{en}} [http://msdn.microsoft.com/vcsharp/ Microsoft Visual C# .NET]
* {{en}} [http://www.fsharp.net F#] {{Webarchive|url=https://web.archive.org/web/20081119161341/http://www.fsharp.net/ |date=2008-11-19 }}
* {{en}} [http://www.
* {{en}} [http://www.csharpfriends.com Situs komunitas C#] {{Webarchive|url=https://web.archive.org/web/20100206115752/http://www.csharpfriends.com/ |date=2010-02-06 }}
* {{en}} [http://www.mono-project.com/using/mcs.html MCS: Kompiler Mono C#] {{Webarchive|url=https://web.archive.org/web/20081119233745/http://www.mono-project.com/using/mcs.html |date=2008-11-19 }}
* {{en}} [http://www.southern-storm.com.au/portable_net.html Portable.NET]
* {{en}} [http://www.icsharpcode.net SharpDevelop: Open Source C# IDE]
* {{en}} [http://msdn.microsoft.com/vstudio/express/visualcsharp Microsoft Visual C# Express Edition], [http://msdn.microsoft.com/vstudio/express/visualcsharp/download/
* {{en}} news://msnews.microsoft.com/microsoft.public.dotnet.languages.csharp
* {{id}} [http://www.netindonesia.net/ Komunitas programmer .NET Indonesia]
* {{en}}[http://www.meshplex.org/wiki/C_Sharp_Tutorial Full C# Online book] {{Webarchive|url=https://web.archive.org/web/20080129022511/http://www.meshplex.org/wiki/C_Sharp_Tutorial |date=2008-01-29 }}
* {{id}} [http://www.pecollege.net/ PE College-Tutorial Gratis Pemrograman C# dalam Bentuk Video].
{{Daftar bahasa pemrograman}}
{{Authority control}}
[[Kategori:Bahasa pemrograman]]
[[Kategori:Bahasa pemrograman berorientasi objek]]
[[Kategori:Bahasa pemrograman yang dibuat pada tahun 2000]]
[[Kategori:Bahasa pemrograman dengan standar ISO]]
[[
[[Kategori:Perangkat lunak 2000]]
[[Kategori:Bahasa pemrograman Microsoft]]
|