Aaron W. Hsu scripsit: > Keep in mind that the desired semantics in a perfect world are closer to > the internal library body in R6RS or the top-level program semantics,
Well, we don't all agree on what counts as a perfect world, obviously. I grant the need for recursive procedures, but I think syntax should be defined before it's used, whether you're in a REPL or not. It has much more to do with a human -- me -- being able to decipher a program in one pass than a computer being able to process it in one pass. When I see what looks like a procedure call, I want to think "Hmm, this is a call to a procedure I don't know", not "Hmm, this might be a procedure call, but then again maybe it's some extension to the syntax of the programming language that the author has not yet deigned to mention." Extensible syntax is a good thing. *Retroactively* extensible syntax strikes me as the sort of dark corner I want nothing to do with. > the semantics of the REPL are an unfortunate necessity because we must > evaluate every form that we encounter as we encounter it Not really, you know. It would be perfectly practical to have a REPL that stashes all definitions and doesn't try to do anything with any of them until an expression is entered. Classic Basic interpreters work like that. Any line with a line number is stored and not processed in any way until you type an unnumbered line, at which point all is compiled (if there's a compiler) and then the unnumbered line is executed. (Some unnumbered lines are commands, of course, which don't depend on the program: LOAD, SAVE, CLEAR, etc.) > That is, a begin form with multiple definitions does not inherently suffer > from the limitation of needing to evaluate each definition before > examining the next, and so we should not apply the restriction. This > restriction is not in place when BEGIN is used in the body of a top-level > program or a library form, Not so in R5RS, where a top-level begin (and immediately nested begins, and their immediately nested begins, etc.) have the same semantics as the sequence of forms of which they are composed. -- John Cowan [email protected] http://ccil.org/~cowan The known is finite, the unknown infinite; intellectually we stand on an islet in the midst of an illimitable ocean of inexplicability. Our business in every generation is to reclaim a little more land, to add something to the extent and the solidity of our possessions. --Thomas Henry Huxley _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
