图灵焦油坑(英語:Turing tarpit)是指功能过于灵活而难以学习和使用的程序设计语言计算机接口[1] 1982年艾伦·佩利在《编程警句英语Epigrams on Programming》中发明了这一术语:[2]

54. 留心图灵焦油坑,在其中任何事情都是可能的但没有什么有趣的事是容易的。

凡是图灵完备的语言都可以写任意程序,因此不严格地来说各种编程语言是等价的。但理论上的能力在实践中的实用性往往并不相同。图灵焦油坑是指一个非常简单的抽象机,实现中的各种细节都要求用户自行处理。[3]它的另一个极端是几乎不需要人为干涉就能执行所有任务的接口,但一旦需求轻微改变就需要调整源代码。

Brainfuck这样深奥的编程语言就被称为图灵焦油坑[4]。它们虽然是图灵完备语言,但故意只实现最少的功能。使用这些语言是一种娛樂數學:设计最简单的基本程序都极为困难,但数学上图灵等价的语言。[5]

参见 编辑

参考文献 编辑

  1. ^ Turing Tarpit. c2.com. 10 March 2010 [7 November 2012]. (原始内容存档于2013-01-20). 
  2. ^ Perlis, A. Epigrams on Programming. ACM SIGPLAN Notices (Yale University). September 1982, 17 (9): 7–13 [28 August 2015]. doi:10.1145/947955.1083808. (原始内容存档于2015-03-22). 
  3. ^ Exploring the depths of a Turing tarpit. practicingruby.com. 7 February 2013 [2019-05-27]. (原始内容存档于2012-02-04). 
  4. ^ Chandra, V. Geek Sublime: The Beauty of Code, the Code of Beauty. Graywolf Press. 2014 [28 August 2015]. ISBN 9781555973261. (原始内容存档于2017-01-13). 
  5. ^ Esoteric Topics in Computer Programming, Cat's Eye Technologies, Canada. ("They present the programmer with the challenge, intrigue, and entertainment of looking at known algorithms and concepts in a whole new light.")

进一步阅读 编辑