ผลต่างระหว่างรุ่นของ "ภาษาโปรแกรม"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
T.ritthikrai (คุย | ส่วนร่วม)
ไม่มีความย่อการแก้ไข
ป้ายระบุ: แก้ไขจากอุปกรณ์เคลื่อนที่ แก้ไขด้วยแอปสำหรับอุปกรณ์เคลื่อนที่ แก้ไขด้วยแอปสำหรับไอโอเอส
บรรทัด 7:
== คำจำกัดความ ==
ภาษาโปรแกรมเป็นสัญกรณ์อย่างหนึ่งสำหรับการเขียนโปรแกรม ซึ่งมีข้อกำหนดต่าง ๆ เกี่ยวกับการคิดคำนวณหรือขั้นตอนวิธี <ref name="Aaby 2004">{{cite book|last=Aaby|first=Anthony|title=Introduction to Programming Languages|year=2004|url=http://burks.brighton.ac.uk/burks/pcinfo/progdocs/plbook/index.htm}}</ref> ผู้แต่งตำราบางคน (ไม่ใช่ทั้งหมด) ได้ให้คำจำกัดความของ "ภาษาโปรแกรม" อย่างเข้มงวดว่า หมายถึงภาษาที่สามารถแสดงออกด้วยขั้นตอนวิธีที่เป็นไปได้''ทั้งหมด'' <ref name="Aaby 2004"/><ref>ในมโนทัศน์แบบคณิตศาสตร์ สิ่งนี้หมายความว่า ภาษาโปรแกรมคือ[[ทัวริงบริบูรณ์]] {{cite book | last=MacLennan | first=Bruce J. | title=Principles of Programming Languages | page=1 | publisher=Oxford University Press | year=1987 | isbn=0-19-511306-3 }}</ref> คุณลักษณะมักเป็นปัจจัยพิจารณาที่สำคัญสำหรับคำถามว่า อะไรที่ถือว่าเป็นภาษาโปรแกรม รวมทั้งปัจจัยต่อไปนี้
* '''การทำงานและเป้าหมาย''' ''ภาษาโปรแกรมคอมพิวเตอร์'' คือภาษาชนิดหนึ่ง <ref name="Fischer">Steven R. Fischer, ''A history of language'', Reaktion Books, 2003, ISBN 186189080X, p. 205</ref> ที่ใช้สำหรับเขียน[[โปรแกรมคอมพิวเตอร์]] ซึ่งเกี่ยวข้องกับคอมพิวเตอร์ที่กระทำการคิดคำนวณหรือขั้นตอนวิธีบางอย่าง <ref name=sigplan>{{cite web|author=[[Association for Computing Machinery|ACM]] SIGPLAN|title=Bylaws of the Special Interest Group on Programming Languages of the Association for Computing Machinery|url=http://www.acm.org/sigs/sigplan/sigplan_bylaws.htm|accessdate=2006-06-19|year=2003}}, ''The scope of SIGPLAN is the theory, design, implementation, description, and application of computer programming languages - languages that permit the specification of a variety of different computations, thereby providing the user with significant control (immediate or delayed) over the computer's operation.''</ref> และควบคุมอุปกรณ์ภายนอกที่เป็นไปได้อาทิ [[เครื่องพิมพ์]] [[เครื่องขับจานบันทึก]] [[หุ่นยนต์]] <ref name="robots">{{cite web|url=http://www.cs.brown.edu/people/tld/courses/cs148/02/programming.html |title=Programming Robots |accessdate=2006-09-23 |last=Dean |first=Tom |date= |year=2002 |work=Building Intelligent Robots |publisher=Brown University Department of Computer Science}}</ref> และอื่น ๆ ตัวอย่างเช่น โปรแกรม[[โพสต์สคริปต์]] มักถูกสร้างโดยโปรแกรมอื่นเพื่อควบคุมเครื่องพิมพ์หรือจอภาพ ภาษาโปรแกรมโดยนัยทั่วไปมากขึ้น อาจใช้พรรณนาการคิดคำนวณบนเครื่องจักรบางชนิด ซึ่งอาจเป็นเครื่องจักรนามธรรมก็ได้ เป็นที่ยอมรับกันโดยทั่วไปว่า ข้อกำหนดภาษาโปรแกรมที่สมบูรณ์ จะต้องมีการพรรณนาลักษณะเครื่องจักรหรือหน่วยประมวลผลสำหรับภาษานั้น ซึ่งอาจเป็นการพรรณนาในอุดมคติก็ได้ <ref name=nara2>R. Narasimahan, Programming Languages and Computers: A Unified Metatheory, pp. 189--247 in Franz Alt, Morris Rubinoff (eds.) Advances in computers, Volume 8, Academic Press, 1994, ISBN 012012108, p.193 : "a complete specification of a programming language must, by definition, include a specification of a processor--idealized, if you will--for that language." [แหล่งข้อมูลนี้มีการอ้างอิงจากแหล่งอื่นที่รับรองข้อความดังกล่าว]</ref> "ในทางปฏิบัติเป็นส่วนใหญ่ ภาษาโปรแกรมเกี่ยวข้องกับคอมพิวเตอร์ จึงทำให้ภาษาโปรแกรมต่าง ๆ โดยปกติถูกกำหนดและศึกษาในแนวทางนี้ <ref>{{cite book|last=Ben Ari|first=Mordechai|title=Understanding Programming Languages|publisher=John Wiley and Sons| year=1996|quote=Programs and languages can be defined as purely formal mathematical objects. However, more people are interested in programs than in other mathematical objects such as groups, precisely because it is possible to use the program—the sequence of symbols—to control the execution of a computer. While we highly recommend the study of the theory of programming, this text will generally limit itself to the study of programs as they are executed on a computer.}}</ref> ภาษาโปรแกรมต่างจาก[[ภาษาธรรมชาติ]]ตรงที่ ภาษาธรรมชาติใช้แสดงปฏิสัมพันธ์ระหว่างมนุษย์ด้วยกันเพียงเท่านั้น ในขณะที่ภาษาโปรแกรมทำให้มนุษย์สื่อสารชุดคำสั่งแก่เครื่องจักรได้อีกด้วย
* '''แนวคิดนามธรรม''' ภาษาโปรแกรมโดยปกติจะมี[[ภาวะนามธรรม (วิทยาการคอมพิวเตอร์)|ภาวะนามธรรม]] สำหรับนิยามและจัดดำเนินการ[[โครงสร้างข้อมูล]] หรือควบคุมกระแสการทำงาน ความจำเป็นในทางปฏิบัติที่ภาษาโปรแกรมสนับสนุนภาวะนามธรรมอย่างเพียงพอ แสดงออกมาด้วยหลักการที่เป็นนามธรรม <ref>David A. Schmidt, ''The structure of typed programming languages'', MIT Press, 1994, ISBN 0262193493, p. 32</ref> หลักการนี้บางครั้งก็คิดค้นขึ้นเพื่อเป็นข้อเสนอแนะให้โปรแกรมเมอร์สามารถใช้ภาวะนามธรรมเช่นนั้นได้อย่างถูกต้อง <ref>{{cite book|last=Pierce|first=Benjamin|title=Types and Programming Languages|publisher=MIT Press|year=2002|isbn=0-262-16209-1|page=339}}</ref>
* '''พลังในการแสดงออก''' [[ทฤษฎีการคำนวณ]]แบ่งประเภทภาษาต่าง ๆ ตามการคิดคำนวณโดยความสามารถในการแสดงออก ภาษา[[ทัวริงบริบูรณ์]]ทุกภาษาสามารถทำให้เกิดผลได้ด้วยเซตของขั้นตอนวิธีที่เหมือนกัน [[ภาษาเอสคิวแอล]]และ[[ภาษาแชริตี]]เป็นตัวอย่างของภาษาที่ไม่เป็นทัวริงบริบูรณ์ แต่ก็ยังเรียกว่าเป็นภาษาโปรแกรม <ref>{{cite web | author=Digital Equipment Corporation | title=Information Technology - Database Language SQL (Proposed revised text of DIS 9075) | url=http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt | work=ISO/IEC 9075:1992, Database Language SQL | accessdate=June 29, 2006}}</ref><ref>{{cite web|author=The Charity Development Group|title=The CHARITY Home Page | url=http://pll.cpsc.ucalgary.ca/charity1/www/home.html | month=December|year=1996|accessdate=2006-06-29}}, ''Charity is a categorical programming language...'', ''All Charity computations terminate.''</ref>