# Lambda the Ultimate

 Sisal Programming language started 9/13/2000; 7:37:02 PM - last post 9/15/2000; 1:55:28 PM
 Chris Rathman - Sisal Programming language   9/13/2000; 7:37:02 PM (reads: 476, responses: 3)
 Sisal Programming language I got interested in Sisal in a roundabout fashion. I was wondering how loops and iteration can be done in a pure functional programming language. As is widely known, for-loops and while-loops can be done in FP by using recursion. But recursion can be a stiff requirement if you are trying to rapidly prototype (at least for some of us lesser programmers). Sisal is an interesting language with it's main emphasis being high speed parallel computing. It also happens to have for-loops and other forms of iteration not seen in most FP languages, but retains it's FP character. It appears to me that the support for loops is syntactic sugar and will compile to an equivalent recursive type solution. Unfortunately, the support by Lawrence Livermore for the language seems to have been discontinued, and their links to the documentation and code do not work. It took a while, but I managed to locate a copy of the tutorial and the latest code distribution. Looks like some interesting ideas from an FP implementation perspective. Posted to "" by Chris Rathman on 9/13/00; 7:42:04 PM

 Ehud Lamm - Re: Sisal Programming language   9/14/2000; 8:51:20 AM (reads: 513, responses: 2)
 Isn't recursion simpler than all those loops ? Using recursion is simple. Well, until you want to make that just tail recursion. Those who don't like recursion should go and read Goedel, Escher, Bach. Don't believe what you read here! (This wasn't a self-referential sentence. I was referring what Andrew wrote...)
 Chris Rathman - Re: Sisal Programming language   9/15/2000; 12:30:56 PM (reads: 532, responses: 1)
 Isn't recursion simpler than all those loops? Using recursion is simple. Well, until you want to make that just tail recursion.As I said, I kind of got into thinking about loops in a round about fashion. Specifically, I was arguing with someone about Go To statements being evil and I pointed the person the Edsger W. Dijkstra classic paper on the Go To Statement Considered Harmful. In that paper, Dijkstra makes the statement that: "Let us now consider repetition clauses (like, while B repeat A or repeat A until B). Logically speaking, such clauses are now superfluous, because we can express repetition with the aid of recursive procedures. For reasons of realism I don't wish to exclude them..." Well, the person I was arguing with countered by saying that Dijkstra's logic could just as easily apply to programming loops. The argument being that recursive solutions are usually cleaner and easier to deal with from a proof standpoint. The question popped up whether loops will become as passe as Go To statements at some point down the road as programming becomes more sophisticated (assuming, of course, that programming languages improve). Are today's loops, tomorrow's Go To's? It does seem that most Functional Programming languages try to eliminate the loop from the programmers toolbox. But, of course, we have Sisal out there which is a FP language that retains loops, but without the downside of loops in imperative languages. Sisal stands for "Streams and Iteration in a Single Assignment Language". So from an FP standpoint, loops are not necessarily anathema, though the manner in which they are used is different than seen in imperative languages. Perhaps not the best reason to get interested in a language - arguing with someone who likes Go To statements. But it is kind of an interesting take on whether FP must rely exclusively on recursion, or whether loops can be made consistent with the paradigm.
 Ehud Lamm - Re: Sisal Programming language   9/15/2000; 1:55:28 PM (reads: 543, responses: 0)
 Well, if you are interested in eliminating loops, I think the best place is to look at APL and its kin. Most operatios automatically work on whole arrays, or array dimensions (using axis specifiers). In J you use the concept of rank. Some of this, with links, was discussed here awhile ago. Loops are pretty low level control structures, but I think they are fundamental enough that they may be imporved upon but not replaced. I am sure programmers will know what loops are, even many years from now. They may also know other things... By the way: programmers should also know what jumps (i.e., gotos) are. That doesn't make goto the control structure of choice.