Re:Ask HN: Most difficult programming language?
by Someone on Thursday September 12, 2013 @11:27AM
(#6374629)
That depends a bit on how one measures difficulty. Brainfuck is hard to read only because its operators are so limited, and is not that hard to write; for a Turing machine, it is fairly powerful, and it has [ and ] to jump around.
Intercal, IMO, is more difficult, but it would not be that hard to improve on it. For example, one could bring back the joy of delay line memory (http://en.wikipedia.org/wiki/Delay_line_memory) by having some metric for the complexity of a statement, and having the computer skip some statements depending on that complexity. Ideally (for the goal of complicating the language), the complexity of a statement would depend on the runtime values of variables. For example, 'A = B * C' is easy when C=10, a bit harder when it is 11, and harder still when C=13, unless, of course, B equals zero or one. Similarly, 'IF A > 7' is easy when A is <= 3 or >= 20, but hard for intermediate values. Of course, a true language would not use such simple notions of complexity. The complexity of 'A = B * C' should also depend on the number of binary carries (better yet, use a mixed-base number system), and, of course, the delay of 'OUTPUT X' depends not only on the length of X, but also on the question whether this flushes the output buffer.
And, of course, the only way of control flow should be something like Cobol's ALTER, all statements should be executed probabilistically, and the language should be a funge in some weird topology (while at it, change the topology when certain conditions apply (number of statements executed modulo 34567 equals 325, number of 1 bits in variable memory is a prime, it's Monday morning, but not a full moon, etc)
Intercal, IMO, is more difficult, but it would not be that hard to improve on it. For example, one could bring back the joy of delay line memory (http://en.wikipedia.org/wiki/Delay_line_memory) by having some metric for the complexity of a statement, and having the computer skip some statements depending on that complexity. Ideally (for the goal of complicating the language), the complexity of a statement would depend on the runtime values of variables. For example, 'A = B * C' is easy when C=10, a bit harder when it is 11, and harder still when C=13, unless, of course, B equals zero or one. Similarly, 'IF A > 7' is easy when A is <= 3 or >= 20, but hard for intermediate values. Of course, a true language would not use such simple notions of complexity. The complexity of 'A = B * C' should also depend on the number of binary carries (better yet, use a mixed-base number system), and, of course, the delay of 'OUTPUT X' depends not only on the length of X, but also on the question whether this flushes the output buffer.
And, of course, the only way of control flow should be something like Cobol's ALTER, all statements should be executed probabilistically, and the language should be a funge in some weird topology (while at it, change the topology when certain conditions apply (number of statements executed modulo 34567 equals 325, number of 1 bits in variable memory is a prime, it's Monday morning, but not a full moon, etc)