Control structure: Difference between revisions

Jump to navigation Jump to search
10 bytes added ,  21:50, 6 March 2021
→‎History: SAX documentation has control words
(History)
(→‎History: SAX documentation has control words)
Line 24: Line 24:
[[Edsger Dijkstra]]'s letter [[wikipedia:Go To Statement Considered Harmful|Go To Statement Considered Harmful]], published in 1968, is widely considered a turning point in the push for structured programming. At the time, APL programs were written as [[defined function]]s using [[Branch]] for control flow, but programmers began to publish responses considering alternatives in the mid-1970s. Several programmers showed how to use structured programming in current APL systems, or modify these systems to better support it.<ref>W. K. Giloi and R. Hoffmann. [https://dl.acm.org/doi/10.1145/800114.803676 Adding a modern control structure to APL without changing the syntax] at [[APL76]].</ref><ref>[[Garth Foster]]. [https://dl.acm.org/doi/10.1145/800136.804483 On the locus of program flow within and among secondary functions] at [[APL79]].</ref><ref>Edward V. Eusebi. [https://dl.acm.org/doi/10.1145/255315.255365 Operators for program control] at [[APL85]].</ref> Others proposed more radical changes that would allow the user to define control structures.<ref>Denis P. Samson. [https://dl.acm.org/doi/10.1145/800058.801110 A proposal for control structures in APL] at [[APL84]].</ref><ref>Robert G. Willhoft. [https://dl.acm.org/doi/10.1145/166198.166235 Structured APL: a proposal for block structured control flow in APL] at [[APL93]].</ref> Experiments to extend APL with ALGOL-style control structures also began in the 1970s. APLGOL, first described in 1972, used names beginning with an underlined character, and was supported by a compiler implemented in and targetting [[APL\360]].<ref>R. A. Kelley. "APLGOL, a Structured Programming Language for APL", IBM Palo Alto Scientific Center Report No. 320-3299, August 1972.</ref> A similar project called SAPL (for "Structured APL") used reserved words for control structures and was published in 1978.<ref>Franklin Kemp. [https://dl.acm.org/doi/10.1145/586040.586043 Design of a structured APL]. [[Quote Quad]] Volume 9 Issue 1. 1978-09.</ref>
[[Edsger Dijkstra]]'s letter [[wikipedia:Go To Statement Considered Harmful|Go To Statement Considered Harmful]], published in 1968, is widely considered a turning point in the push for structured programming. At the time, APL programs were written as [[defined function]]s using [[Branch]] for control flow, but programmers began to publish responses considering alternatives in the mid-1970s. Several programmers showed how to use structured programming in current APL systems, or modify these systems to better support it.<ref>W. K. Giloi and R. Hoffmann. [https://dl.acm.org/doi/10.1145/800114.803676 Adding a modern control structure to APL without changing the syntax] at [[APL76]].</ref><ref>[[Garth Foster]]. [https://dl.acm.org/doi/10.1145/800136.804483 On the locus of program flow within and among secondary functions] at [[APL79]].</ref><ref>Edward V. Eusebi. [https://dl.acm.org/doi/10.1145/255315.255365 Operators for program control] at [[APL85]].</ref> Others proposed more radical changes that would allow the user to define control structures.<ref>Denis P. Samson. [https://dl.acm.org/doi/10.1145/800058.801110 A proposal for control structures in APL] at [[APL84]].</ref><ref>Robert G. Willhoft. [https://dl.acm.org/doi/10.1145/166198.166235 Structured APL: a proposal for block structured control flow in APL] at [[APL93]].</ref> Experiments to extend APL with ALGOL-style control structures also began in the 1970s. APLGOL, first described in 1972, used names beginning with an underlined character, and was supported by a compiler implemented in and targetting [[APL\360]].<ref>R. A. Kelley. "APLGOL, a Structured Programming Language for APL", IBM Palo Alto Scientific Center Report No. 320-3299, August 1972.</ref> A similar project called SAPL (for "Structured APL") used reserved words for control structures and was published in 1978.<ref>Franklin Kemp. [https://dl.acm.org/doi/10.1145/586040.586043 Design of a structured APL]. [[Quote Quad]] Volume 9 Issue 1. 1978-09.</ref>


Control structures, using reserved words, were included in [[A+]] by 1989.<ref name="HOPL">[[Roger Hui]] and [[Morten Kromberg]]. [https://dl.acm.org/doi/abs/10.1145/3386319 ''APL since 1978'']. ACM HOPL IV. 2020-06.</ref> [[J]] added control structures such as <source inline lang=j>while.</source> in the 1994 release 2.0.1, and [[Dyalog]] introduced them with colon prefixes in version 8.0, in 1996. Both languages added for-each structures shortly afterwards. [[APL*PLUS]] included control structures by 1995.<ref>[[Robert Bernecky]]. [https://dl.acm.org/doi/10.1145/206913.206949 The role of dynamic programming & control structures in performance] at [[APL95]].</ref> They also appear in [[APLX]] and [[NARS2000]].
Control structures, using reserved words, were included in [[A+]] by 1989.<ref name="HOPL">[[Roger Hui]] and [[Morten Kromberg]]. [https://dl.acm.org/doi/abs/10.1145/3386319 ''APL since 1978'']. ACM HOPL IV. 2020-06.</ref> [[J]] added control structures such as <source inline lang=j>while.</source> in the 1994 release 2.0.1, and [[Dyalog]] introduced them with colon prefixes in version 8.0, in 1996. Both languages added for-each structures shortly afterwards. [[APL*PLUS]] included control structures by 1995.<ref>[[Robert Bernecky]]. [https://dl.acm.org/doi/10.1145/206913.206949 The role of dynamic programming & control structures in performance] at [[APL95]].</ref> They also appear in [[SAX]], [[APLX]], and [[NARS2000]].


Newer APL dialects such as [[ngn/apl]], [[APL\iv]], [[dzaima/APL]] often discard control structures, as well as [[Branch]], on the grounds that [[dfn]]s along with operators like [[Each]] and [[Reduce]] or recursion allow similar functionality. Such a possibility was not available in the 1970s because APLs at the time did not allow arbitrary functions to be operands, and was not generally considered before the rise of dfns and [[tacit programming]] in the 1990s. [[April]] does not support control structures on the grounds that April code should be embedded in Common Lisp, which can handle control flow better. [[BQN]] also does not include pre-defined control structures, but its first-class functions and list literals allow a similar syntax to be achieved without extending the language.<ref>[[Marshall Lochbaum]]. [https://mlochbaum.github.io/BQN/doc/control.html Control flow in BQN]. Accessed 2021-03-06.</ref>
Newer APL dialects such as [[ngn/apl]], [[APL\iv]], [[dzaima/APL]] often discard control structures, as well as [[Branch]], on the grounds that [[dfn]]s along with operators like [[Each]] and [[Reduce]] or recursion allow similar functionality. Such a possibility was not available in the 1970s because APLs at the time did not allow arbitrary functions to be operands, and was not generally considered before the rise of dfns and [[tacit programming]] in the 1990s. [[April]] does not support control structures on the grounds that April code should be embedded in Common Lisp, which can handle control flow better. [[BQN]] also does not include pre-defined control structures, but its first-class functions and list literals allow a similar syntax to be achieved without extending the language.<ref>[[Marshall Lochbaum]]. [https://mlochbaum.github.io/BQN/doc/control.html Control flow in BQN]. Accessed 2021-03-06.</ref>

Navigation menu