Swift (bahasa pemrograman): Perbedaan antara revisi
Konten dihapus Konten ditambahkan
kTidak ada ringkasan suntingan |
Tidak ada ringkasan suntingan |
||
Baris 1: | Baris 1: | ||
{{about|bahasa pemorgraman Apple|bahasa skrip paralel|Swift (bahasa skrip paralel)}} |
{{about|bahasa pemorgraman Apple|bahasa skrip paralel|Swift (bahasa skrip paralel)}} |
||
<!--as the above indicates, "''This article is about the Apple programming language. For the parallel scripting language, see [[Swift (parallel scripting language)]].''" This means "don't link to http://swift-lang.org/, as that's the site for the parallel scripting language named Swift, not the site for the Apple programming language named Swift.--> |
<!--as the above indicates, "''This article is about the Apple programming language. For the parallel scripting language, see [[Swift (parallel scripting language)]].''" This means "don't link to http://swift-lang.org/, as that's the site for the parallel scripting language named Swift, not the site for the Apple programming language named Swift.--> |
||
{{Current|date=June 2014}} |
|||
{{Infobox programming language |
{{Infobox programming language |
||
| name = Swift (bahasa pemrograman) |
| name = Swift (bahasa pemrograman) |
Revisi per 4 Juni 2014 07.20
Berkas:Apple Swift Logo.png | |
pengembang | Apple |
---|---|
Rilis perdana | 2014 |
Website | http://developer.apple.com/swift |
Terpengaruh oleh | |
Objective-C, Groovy[1] | |
swift |
Swift adalah bahasa pemrograman objek fungsional untuk pengembangan iOS dan OS X yang dibuat oleh Apple.[2] Didesain untuk berdampingan dengan Objective-C dan menghindari program dari kode yang salah. Swift diperkenalkan oleh Apple pada acara tahunan WWDC 2014.[2] Ini dibangun dengan compiler LLVM yang termasuk dalam Xcode 6 beta. Sebuah buku berisi 500 halaman petunjuk, The Swift Programming Language, dirilis bersamaan dengan WWDC, dan tersedia secara gratis di iBooks.[3]
Pada tanggal 2 Juni 2014, aplikasi WWDC menjadi yang pertama dirilis ke publik yang ditulis dengan Swift.
Contoh kode
println("Halo, dunia")
let people = ["Anna": 67, "Beto": 8, "Jack": 33, "Sam": 25]
for (nama, age) in people {
println("\(nama) berusia \(age) tahun.")
}
References
- ^ Laforge, Guillaume (2 June 2014). "Apple's Swift programming language inspired by Groovy". Diakses tanggal 3 June 2014.
- ^ a b "Apple announces Swift, a new programming language for iOS".
- ^ The Swift Programming Language. Apple, Inc. 02 June 2014.