Haskell: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Wagino Bot (bicara | kontrib)
k →‎top: minor cosmetic change
InternetArchiveBot (bicara | kontrib)
Rescuing 12 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(15 revisi perantara oleh 10 pengguna tidak ditampilkan)
Baris 1:
{{Infobox programming language
|name = Haskell
|logo = [[FileBerkas:Haskell-Logo.svg|120px|Logo of Haskell]]
|paradigm = [[functional programming|functional]], lazy/[[non-strict programming language|non-strict]], [[modular programming|modular]]
|year = 1990
|designer = [[Simon Peyton Jones]], [[Lennart Augustsson]], [[Dave Barton]], [[Brian Boutel]], [[Warren Burton (computer scientist)|Warren Burton]], [[Joseph Fasel]], [[Kevin Hammond (computer scientist)|Kevin Hammond]], [[Ralf Hinze]], [[Paul Hudak]], [[John Hughes (computer scientist)|John Hughes]], [[Thomas Johnsson]], [[Mark Jones (computer scientist)|Mark Jones]], [[John Launchbury]], [[Erik Meijer (computer scientist)|Erik Meijer]], [[John Peterson (computer scientist)|John Peterson]], [[Alastair Reid (computer scientist)|Alastair Reid]], [[Colin Runciman]], [[Philip Wadler]]
|developer =
|latest release version = <!-- Of the language specification, not the [[Haskell Platform]]! -->Haskell 2010<ref name="2010ann">{{cite mailing list |url=http://www.haskell.org/pipermail/haskell/2009-November/021750.html |title=Announcing Haskell 2010 |date=24 November 2009 |accessdate=12 March 2011 |mailinglist=Haskell |last=Marlow |first=Simon}}</ref>
|latest release date = {{start date and age|df=yes|2010|07}}
|latest test version = Haskell 2011{{Citation needed|date=June 2011}}
Baris 13:
|implementations = [[Glasgow Haskell Compiler|GHC]], [[Hugs]], [http://www.cs.york.ac.uk/fp/nhc98/ NHC], [http://repetae.net/john/computer/jhc/ JHC], [[Yhc]], [http://www.cs.uu.nl/wiki/UHC UHC]
|dialects = [[Helium (Haskell)|Helium]], [[Gofer (software)|Gofer]], [[Hugs]], [[Ωmega]]
|influenced = [[Agda (theorem prover)|Agda]],<ref>{{cite web|url=http://www.cse.chalmers.se/~ulfn/papers/afp08/tutorial.pdf|title=Dependently Typed Programming in Agda|last=Norell|first=Ulf|year=2008|publisher=Chalmers University|accessdate=9 February 2012|location=Gothenburg|archive-date=2014-04-01|archive-url=https://web.archive.org/web/20140401144502/http://www.cse.chalmers.se/~ulfn/papers/afp08/tutorial.pdf|dead-url=no}}</ref> [[Bluespec, Inc.|Bluespec]],{{Citation needed|date=February 2012}} [[C++11]]/[[Concepts (C++)|Concepts]],<ref>{{cite journal|title=Design of Concept Libraries for C++|first1=Bjarne|last1=Stroustrup|authorlink1=Bjarne Stroustrup|first2=Andrew|last2=Sutton|url=http://www2.research.att.com/~bs/sle2011-concepts.pdf|year=2011|archiveurl=httphttps://web.archive.org/web/20110825052517/http://www2.research.att.com/~bs/sle2011-concepts.pdf|archivedate=2011-08-25|journal=|access-date=2021-02-21|dead-url=yes}}</ref> [[C Sharp (programming language)|C#]]/[[Language Integrated Query|LINQ]],<ref>{{cite web|url=http://channel9.msdn.com/shows/Going+Deep/Lecture-Series-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-1/|title=C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals, Chapter 1 of 13|last=Meijer|first=Erik|date=1 October 2009|work=[[Channel 9 (discussion forum)|Channel 9]]|publisher=Microsoft|accessdate=9 February 2012|archive-date=2012-06-16|archive-url=https://web.archive.org/web/20120616051226/http://channel9.msdn.com/shows/Going+Deep/Lecture-Series-Erik-Meijer-Functional-Programming-Fundamentals-Chapter-1/|dead-url=yes}}</ref><ref>{{cite news|url=http://www.infoq.com/interviews/LINQ-Erik-Meijer|title=Erik Meijer on LINQ|last=Drobi|first=Sadek|date=4 March 2009|work=InfoQ|publisher=C4Media Inc.|accessdate=9 February 2012|location=QCon [[San Francisco|SF]] 2008|archive-date=2021-01-26|archive-url=https://web.archive.org/web/20210126191443/https://www.infoq.com/interviews/LINQ-Erik-Meijer/|dead-url=no}}</ref> [[CAL (Quark Framework)|CAL]],{{Citation needed|date=February 2012}} [[Cayenne (programming language)|Cayenne]],{{Citation needed|date=February 2012}} [[Clean (programming language)|Clean]],<ref>{{cite journal
|first1 = Paul
|last1 = Hudak
Baris 32:
|pages = 12–1–12–55
|isbn = 978-1-59593-766-X {{Please check ISBN|reason=Check digit (X) does not correspond to calculated figure.}}
}}</ref> [[Clojure]],<ref>{{cite web|url=http://www.amazon.com/gp/richpub/listmania/fullview/R3LG3ZBZS4GCTH|title=Clojure Bookshelf|last=Hickey|first=Rich|work=Listmania!|publisher=Amazon.com|accessdate=9 February 2012|archive-date=2012-03-19|archive-url=https://web.archive.org/web/20120319065828/http://www.amazon.com/Clojure-Bookshelf/lm/R3LG3ZBZS4GCTH|dead-url=no}}</ref> [[CoffeeScript]],<ref>{{cite news|url=http://www.javaworld.com/javaworld/jw-10-2011/111018-coffeescript-vs-dart.html|title=Turn up your nose at Dart and smell the CoffeeScript|last=Heller|first=Martin|date=18 October 2011|work=JavaWorld|publisher=InfoWorld|accessdate=9 February 2012|archive-date=2012-02-10|archive-url=https://web.archive.org/web/20120210141629/http://www.javaworld.com/javaworld/jw-10-2011/111018-coffeescript-vs-dart.html|dead-url=yes}}</ref> [[Curry (programming language)|Curry]],{{Citation needed|date=February 2012}} [[Epigram (programming language)|Epigram]],{{Citation needed|date=February 2012}} [[Escher (programming language)|Escher]],{{Citation needed|date=February 2012}} [[F Sharp (programming language)|F#]],<ref>{{cite book|last1=Syme|first1=Don|authorlink1=Don Syme|last2=Granicz|first2=Adam|last3=Cisternino|first3=Antonio|title=Expert F#|year=2007|publisher=[[Apress]]|page=2 |quote=F# also draws from Haskell particularly with regard to two advanced language features called ''sequence expressions'' and ''workflows''.}}</ref> [[Factor (programming language)|Factor]],{{Citation needed|date=February 2012}} [[Isabelle theorem prover|Isabelle]],{{Citation needed|date=February 2012}} [[Generics in Java|Java Generics]],{{Citation needed|date=February 2012}} [[Kaya (programming language)|Kaya]],{{Citation needed|date=February 2012}} [[Mercury (programming language)|Mercury]],{{Citation needed|date=February 2012}} [[Ωmega interpreter|Omega]],{{Citation needed|date=February 2012}} [[Perl 6]],<ref>{{cite web|url=http://www.perlfoundation.org/perl6/index.cgi?glossary_of_terms_and_jargon|title=Glossary of Terms and Jargon|date=28 February|work=Perl Foundation Perl 6 Wiki|publisher=[[The Perl Foundation]]|accessdate=9 February 2012|archive-date=2012-01-21|archive-url=https://web.archive.org/web/20120121145808/http://www.perlfoundation.org/perl6/index.cgi?glossary_of_terms_and_jargon|dead-url=yes}}</ref> [[Python (programming language)|Python]],<ref>{{cite web|url=http://docs.python.org/howto/functional.html|title=Functional Programming HOWTO|last=Kuchling|first=A. M.|work=Python v2.7.2 documentation|publisher=Python Software Foundation|accessdate=9 February 2012|archive-date=2012-10-24|archive-url=https://web.archive.org/web/20121024163217/http://docs.python.org/howto/functional.html|dead-url=no}}</ref> [[Qi (programming language)|Qi]],{{Citation needed|date=February 2012}} [[Scala (programming language)|Scala]],<ref>{{cite web|url=http://blog.fogus.me/2010/08/06/martinodersky-take5-tolist/|title=MartinOdersky take(5) toList|last=Fogus|first=Michael|date=6 August 2010|work=Send More Paramedics|accessdate=9 February 2012|archive-date=2012-02-14|archive-url=https://web.archive.org/web/20120214225555/http://blog.fogus.me/2010/08/06/martinodersky-take5-tolist/|dead-url=no}}</ref> [[Timber (programming language)|Timber]],{{Citation needed|date=February 2012}} [[Visual Basic .NET|Visual Basic 9.0]]<ref>[[Erik Meijer (computer scientist)|Erik Meijer]], "Confessions of a Used Programming Language Salesman",[httphttps://web.archive.org/web/20110923133552/http://research.microsoft.com/en-us/um/people/emeijer/papers/es012-meijer.pdf] [[OOPSLA]] 2007</ref>
|influenced by = [[APL (programming language)|APL]],{{Citation needed|date=February 2012}} [[Clean (programming language)|Clean]],<ref name="haskell-report-influences"/> [[FP (programming language)|FP]],<ref name="haskell-report-influences"/> [[Gofer (programming language)|Gofer]],<ref name="haskell-report-influences"/> [[Hope (programming language)|Hope]] and Hope<sup>+</sup>,<ref name="haskell-report-influences"/> [[Id (programming language)|Id]],<ref name="haskell-report-influences"/> [[ISWIM]],<ref name="haskell-report-influences"/> [[Kent Recursive Calculator|KRC]],<ref name="haskell-report-influences"/> [[Lisp (programming language)|Lisp]],<ref name="haskell-report-influences">Haskell 98 Report, p. xi</ref> [[Miranda (programming language)|Miranda]],<ref name="haskell-report-influences"/> [[ML (programming language)|ML]] and [[Standard ML]],<ref name="haskell-report-influences"/> [[Orwell (programming language)|Orwell]], [[SASL (programming language)|SASL]],<ref name="haskell-report-influences"/> [[SISAL]],<ref name="haskell-report-influences"/> [[Scheme (programming language)|Scheme]]<ref name="haskell-report-influences"/>
|operating system = [[Cross-platform]]
Baris 39:
|file ext = <code>.hs</code>, <code>.lhs</code>
}}
'''Haskell''' adalah bahasa [[Pemrograman Fungsional|pemrograman fungsional]] murni. Nama bahasa pemrograman Haskell diambil dari nama seseorang matematikawan [[Haskell Curry]], yang terkenal akan karyanya di bidang ''combinatory logic''. Haskell hanya mengenal ''expression'' dan ''equation''.
 
== Hello WorldContoh ==
 
Berikut ini adalah contoh program sederhana yang akan mencetak kalimat "Hello, World!"
=== Hello World ===
<source lang=haskell>
Berikut ini adalah contoh program mainsederhana =yang putStrLnakan mencetak kalimat "Hello, worldWorld!".
<sourcesyntaxhighlight lang="haskell">
</source>
main = putStrLn "Hello, world!"
==Pranala Luar==
</syntaxhighlight>
 
=== Penjumlahan sederhana ===
Berikut ini adalah contoh program sederhana yang akan mencetak kalimathasil "Hello,penjumlahan World!"antara 2 dan 10.<syntaxhighlight lang="haskell">
main = print (2 + 10)
</syntaxhighlight>
 
=== Cetak nama ===
Berikut ini adalah contoh program sederhana yang akan meminta nama pengguna dan mencetaknya kembali.<syntaxhighlight lang="haskell" line="1">
main = do
putStrLn "Masukan nama Anda:"
nama <- getLine
putStrLn ("Selamat datang, " ++ nama ++ "!")
</syntaxhighlight>
 
== Referensi ==
{{reflist}}
 
== Pranala Luarluar ==
{{Wikibooks|Haskell}}
{{Wikibooks|Write Yourself a Scheme in 48 Hours}}
* {{Official website|http://haskell.org}}
* [http://www.haskell.org/haskellwiki/Language_and_library_specification Language and library specification] {{Webarchive|url=https://web.archive.org/web/20150102195106/https://www.haskell.org/haskellwiki/Language_and_library_specification |date=2015-01-02 }} at the Haskell Wiki
* {{dmoz|Computers/Programming/Languages/Haskell|Haskell}}
; Various
* [http://www.willamette.edu/~fruehr/haskell/evolution.html The Evolution of a Haskell Programmer] {{Webarchive|url=https://web.archive.org/web/20070101192126/http://www.willamette.edu/~fruehr/haskell/evolution.html |date=2007-01-01 }}, slightly humorous overview of different programming styles available in Haskell
* [http://haskell.readscheme.org/ Online Bibliography of Haskell Research] {{Webarchive|url=https://web.archive.org/web/20080915054919/http://haskell.readscheme.org/ |date=2008-09-15 }}
* [http://contemplatecode.blogspot.com/search/label/HWN Haskell Weekly News] {{Webarchive|url=https://web.archive.org/web/20230519125853/http://contemplatecode.blogspot.com/search/label/HWN |date=2023-05-19 }}
* [http://themonadreader.wordpress.com/ The Monad.Reader] {{Webarchive|url=https://web.archive.org/web/20230608031832/https://themonadreader.wordpress.com/ |date=2023-06-08 }}, quarterly magazine on Haskell topics
* {{cite podcast|url=http://www.se-radio.net/2008/08/episode-108-simon-peyton-jones-on-functional-programming-and-haskell/ |title=Episode 108: Simon Peyton Jones on Functional Programming and Haskell |website=Software Engineering Radio |host=Markus |date=29 August 2008}}
* [http://leksah.org/ Leksah] {{Webarchive|url=https://web.archive.org/web/20120513234524/http://leksah.org/ |date=2012-05-13 }}, a GTK-based Haskell IDE written in Haskell
;Tutorials
* [http://tryhaskell.org/ Try Haskell!] {{Webarchive|url=https://web.archive.org/web/20230802163743/https://tryhaskell.org/ |date=2023-08-02 }}, an in-browser interactive tutorial
* [http://hal3.name/docs/daume02yaht.pdf Yet Another Haskell Tutorial] {{Webarchive|url=https://web.archive.org/web/20100415154045/http://hal3.name/docs/daume02yaht.pdf |date=2010-04-15 }}, by Hal Daumé III; assumes far less prior knowledge than official tutorial
* [http://cheatsheet.codeslower.com/ The Haskell Cheatsheet] {{Webarchive|url=https://web.archive.org/web/20230815210229/http://cheatsheet.codeslower.com/ |date=2023-08-15 }}, compact language reference and mini-tutorial
{{Daftar bahasa pemrograman}}
 
{{stub}}
{{Authority control}}
 
[[Kategori:Bahasa pemrograman]]
[[Kategori:Perangkat lunak bebas]]
 
 
{{stub}}