[comp.lang.scheme] top level definitions

max@polya.Stanford.EDU (Max Hailperin) (05/03/89)

I like the wrap-it-all-with-a-let semantics for top-level definitions.
However, note that this is not in keeping with R3RS, in that it disallows
such programs as
 (define pi 3.14159)
 (define radius 10)
 (define circumference (* 2 pi radius))
 circumference
[Abelson and Sussman, p. 8], which would be legal under R3RS's set!-like
semantics for top-level definitions.

Of course, you could patch things up by switching from letrec to letrec*.
My preference is to adopt the letrec-based version as official (making the
above example not standard scheme), with the letrec*-based version as an
incouraged extension for interactive implementations (note that letrec*
is a legal implementation of letrec, as remarked in R3RS).

There is also an issue of what to do with multiple definitions of the
same variable in the same scope, which R3RS doesn't address for
internal definitions and is a bigger issue for top-level interactions.
Again, it's probably best to make any use of this feature
non-standard, with some encouraged extension for interactive
top-levels.

les@unicads.UUCP (Les Milash) (05/04/89)

In article <8912@polya.Stanford.EDU> mxh@sumex-aim.Stanford.EDU (Max Hailperin) writes:
>[Abelson and Sussman, p. 8], which would be legal under R3RS's set!-like
  ^^^^^^^^^^^^^^^^^^^ sorry to be so ignorant, but what is this?
I've seen R*S's but never a book on Scheme.


(After reading about Screme on the 88K in ASPLOS III I'm getting tempted to
write one for INMOS Transputers.  Any huge interest in this out there?
Imagine the potential: "the embedded symbolic computer".  For a microwave
that can tell you WHY weenies take 2 minutes, or a dashboard that can
debate the wisdom of using seatbelts AND WIN.

Can anybody point me at thoughts about Schemes on multiprocessors (i suspect
Scheme is a great language for multiprocessors but I don't really know the
details) or just an overview of Scheme (i suspect that it's "Lisp without
X or Y or Z" which gives you "Lisp with some additional magic powers").
My goal is to have a nice language for programming a single
processor, and running bunches of those, but perhaps there are some slick
things permitting parallel evaluation of subexpressions  by multple 
processors etc.)

any other tips for a rank beginner?  

(be nice, i'm just a fresh convert from the C world, i just got
sick of having to do in my programs what Scheme does for me in
the language.)

gupta@prlhp1.prl.philips.co.uk (gupta) (05/31/89)

In article <417@unicads.UUCP> les@unicads.UUCP (Les Milash) writes:
>(After reading about Screme on the 88K in ASPLOS III I'm getting tempted to
>write one for INMOS Transputers.  Any huge interest in this out there?
>Can anybody point me at thoughts about Schemes on multiprocessors (i suspect
>Scheme is a great language for multiprocessors but I don't really know the
>details) or just an overview of Scheme (i suspect that it's "Lisp without
>X or Y or Z" which gives you "Lisp with some additional magic powers").
>My goal is to have a nice language for programming a single
>processor, and running bunches of those, but perhaps there are some slick
>things permitting parallel evaluation of subexpressions  by multple 
>processors etc.)
>
>any other tips for a rank beginner?  

Try these :-

"Multilisp : A language for concurrent-symbolic computation"
   Robert Halstead Jr. ACM Trans. on Prog. Langs & Systems 
            Vol 7, no 4, Oct 1985

"QLisp : Experience and Directions" Ron Goldman & Richard P Gabriel,
     Lucid Inc.,
                          and
"Restructuring Lisp Programs for Concurrent execution" 
   James R. Larus & Paul N. Hilfinger
both in Proc. of ACM/SIGPLAN PPEALS (Symposium on Parallel Programing:
Experience with Applications, Languages and Systems, July 1988.

"Parallel Symbolic Computing" Robert Halsteaf Jr
 (plus other articles)  IEEE Computer August 1986
-- 
Ashok Gupta
Post  : Philips Research Labs, Crossoak Lane, Redhill, Surrey, RH1 5HA, U.K.
Voice : +44 293 785544 
email : gupta@prl.philips.co.uk