ผลต่างระหว่างรุ่นของ "การเขียนโปรแกรมเชิงฟังก์ชัน"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
Vee (คุย | ส่วนร่วม)
แปลจากภาษาอังกฤษ
Vee (คุย | ส่วนร่วม)
แปลจากภาษาอังกฤษ
บรรทัด 6:
ในกลับกัน[[การเขียนโปรแกรมเชิงคำสั่ง]]เปลี่ยนสถานะด้วยคำสั่งในภาษาต้นทาง ตัวอย่างที่ง่ายที่สุดคือการกำหนดค่า [[การเขียนโปรแกรมเชิงคำสั่ง]]ไม่มีฟังก์ชันในความหมายแบบคณิตศาสตร์แต่มีในความหมายแบบ[[ซับรูทีน]] ซึ่งมี[[ผลข้างเคียง (วิทยาการคอมพิวเตอร์)|ผลข้างเคียง]]ที่อาจะเปลี่ยนค่าของสถานะของโปรแกรมได้ ฟังก์ชันที่ไม่คืนค่าจึงสมเหตุสมผลเพราะขาด[[ความโปร่งใสในการอ้างอิง]] ได้แก่นิพจน์เดียวกันทางภาษาสามารถให้ผลลัพธ์ที่มีค่าต่างกันได้ในเวลาที่ต่างกันขึ้นกับสถานะของโปรแกรมที่กำลังกระทำการ<ref name="hudak1989"/>
 
ภาษาโปรแกรมเชิงฟังก์ชันโดยเฉพาะ[[ภาษาโปรแกรมเชิงฟังก์ชันบริสุทธิ]] เช่น [[ภาษาโฮป]]ถูกในความสำคัญใน[[วงการวิชาการ]]มากกว่าในการพัฒนาซอฟต์แวร์เชิงพาณิชย์ อย่างไรก็ตามภาษาโปรแกรมที่มีชื่อเสียงซึ่งสนับสนุนการเขียนโปรแกรมเชิงฟังก์ชัน เช่น [[ภาษาคอมมอนลิสป์]] [[ภาษา Scheme]]<ref name="clinger1987"/><ref name="hartheimer1987"/><ref name="kidd2007"/><ref name="cleis2006"/> [[ภาษา Clojure]]<ref name="useR"/><ref name="Chambers"/> [[ภาษา Wolfram]]<ref name="reference.wolfram.com">{{cite web | title = Wolfram Language Guide: Functional Programming | url = http://reference.wolfram.com/language/guide/FunctionalProgramming.html | year = 2015 | accessdate = 2015-08-24 }}</ref> (หรือ [[ภาษา Mathematica]]) [[ภาษา Racket]]<ref name="racket-video-games"/> [[ภาษาเออร์แลง]]<ref name="erlang-faq"/><ref name="armstrong2007"/><ref name="larson2009"/> [[ภาษา OCaml]]<ref name="minksy2008"/><ref name="leroy2007"/> [[ภาษา Haskell]]<ref name="haskell-industry"/><ref name="hudak2007"/> และ[[ภาษาเอฟชาร์ป]]<ref name='quantFSharp'>{{cite conference | last = Mansell | first = Howard | title = Quantitative Finance in F# | url = http://cufp.galois.com/2008/abstracts.html#MansellHoward | year = 2008 | conference = CUFP 2008 | accessdate = 2009-08-29 }}</ref><ref name='businessAppsFSharp'>{{cite conference | last = Peake | first = Alex | title = The First Substantial Line of Business Application in F# | url = http://cufp.galois.com/2009/abstracts.html#AlexPeakeAdamGranicz | year = 2009 | conference = CUFP 2009 | accessdate = 2009-08-29 }}</ref> ใช้ในโปรแกรมประยุกต์เชิงอุตสาหกรรมและเชิงพาณิชย์โดยองค์กรอย่างกว้างขวาง การเขียนโปรแกรมเชิงฟังก์ชันยังได้รับการรองรับใน[[ภาษาเขียนโปรแกรมเฉพาะทาง]]บางภาษา เช่น [[ภาษาอาร์]] (สถิติ)<ref name="Amath-CO"/> [[ภาษาเจ]] [[ภาษาเค]] และ[[ภาษาคิวจาก Kx Systems]] (การวิเคราะห์ทางการคลัง) [[XQuery]]/[[XSLT]] ([[เอกซ์เอ็มแอล]])<ref name="Novatchev"/><ref name="Mertz"/> และ[[ภาษาโอปอล]]<ref name="Opal (programming language)"/> ภาษาเชิงประกาศเฉพาะทางที่ใช้งานอย่างกว้างขวางเช่น [[ภาษาสอบถามเชิงโครงสร้าง]] และ[[Lex]]/[[Yacc]] ใช้บางส่วนประกอบของการเขียนโปรแกรมเชิงฟังก์ชันโดยเฉพาะใน eschewing [[วัตถุที่เปลี่ยนแปลงได้]].<ref name="Chamberlin_Boyce"/>
 
 
 
== อ้างอิง ==
เส้น 39 ⟶ 37:
<ref name="racket-video-games">{{cite web | title = State-Based Scripting in Uncharted 2 | url = http://www.gameenginebook.com/gdc09-statescripting-uncharted2.pdf | archiveurl = https://web.archive.org/web/20121215014637/http://www.gameenginebook.com/gdc09-statescripting-uncharted2.pdf | archivedate = 2012-12-15 | accessdate = 2011-08-08 }}</ref>
 
<ref name="Amath-CO">{{cite web | author = Department of Applied Math, University of Colorado | title = Functional vs. Procedural Programming Language | url = http://amath.colorado.edu/computing/mmm/funcproc.html | archiveurl = https://web.archive.org/web/20071113175801/http://amath.colorado.edu/computing/mmm/funcproc.html | archivedate = 2007-11-13 | accessdate = 2006-08-28 }}</ref>
 
<ref name="Novatchev">{{cite web | url = http://www.topxml.com/xsl/articles/fp/ | author = Dimitre Novatchev | title = The Functional Programming Language XSLT&nbsp;— A proof through examples | accessdate = May 27, 2006 | work=TopXML }}</ref><ref name="Mertz">{{cite web | url = http://gnosis.cx/publish/programming/xml_models_fp.html | author = David Mertz | title = XML Programming Paradigms (part four): Functional Programming approached to XML processing | accessdate = May 27, 2006 | work=IBM developerWorks }}</ref>
 
<ref name="Opal (programming language)">[[Opal (programming language)|OPtimized Applicative Language]]</ref>
 
<ref name="Chamberlin_Boyce">{{cite journal | title = SEQUEL: A structured English query language | author = [[Donald D. Chamberlin]] and [[Raymond F. Boyce]] | journal = Proceedings of the 1974 ACM SIGFIDET | pages = 249–264 | year = 1974 }}</ref>
}}
[[หมวดหมู่:กระบวนทัศน์การเขียนโปรแกรม]]