Write-only language

In computer humor, a write-only language is a pejorative term for a programming language alleged to have syntax or semantics sufficiently dense and bizarre that any routine of significant size is too difficult to understand by other programmers and cannot be safely edited.[1] Similarly, write-only code is source code so arcane, complex, or ill-structured that it cannot be reliably modified or even comprehended by anyone with the possible exception of the author.[1] Write-only code is also referred to as line noise, suggesting that the code looks like spurious characters from signal noise in the communication line. In such a language it would be more difficult to read, understand, and modify existing source code than to start over and rewrite it from scratch.

A more rarely used term is read-only language, which refers to systems with so many boundary conditions that the code can only be written through constant experimentation and not from first principles. The resulting code is perfectly readable by other programmers, but any attempt to duplicate it in another context will fail. AppleScript has been described as a read-only language.[2]

Examples

Languages that are often derided as write-only include APL, Dynamic debugging technique (DDT), Perl,[3] Forth, Haskell, Text Editor and Corrector (TECO),[4] Mathematica, IGOR Pro and regular expression syntax used in various languages. Attributes that these languages have in common include a large set of operators and a syntax which encourages, or at least permits, the writing of very dense code. Some also have syntaxes which are very different from other languages, and some use different characters sets. The code below for example is Conway's Game of Life as written in APL2:[5]

⍎'⎕',∊N⍴⊂S←'←⎕←(3=T)∨M∧2=T←⊃+/(V⌽¨⊂M),(V⊖¨⊂M),(V,⌽V)⌽¨(V,V←1 ¯1)⊖¨⊂M'

Read-only language

AppleScript has been described as a read-only language due to considerable implementation differences between different programs on the Macintosh platform. In theory, AppleScript is a simple language with considerable syntactic sugar that makes code easy to read and write. However, the core of the system, especially the system known as "chunking" and the objects it works on, has to be implemented within the third-party applications that support scripting. This support is not easy to add, and applications pick and choose which portions of the chunking system to implement. This leads to essentially random support within applications.

See also

References

  1. 1 2 "write-only language". Jargon File. Retrieved 2015-03-28.
  2. "Read Only Language". Retrieved 2015-03-28.
  3. "Write Only Language". Retrieved 2015-03-28.
  4. Finseth, Craig A. (2006). The Craft of Text Editing. Lulu. ISBN 978-1-4116-8297-9.
  5. "Conway's Game of Life in one line of APL". Dr.Dobbs. February 2006. Archived from the original on 2015-03-24. Retrieved 2015-03-28.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.