ajayshah@alhena.usc.edu (Ajay Shah) (04/17/91)
I came across Scheme recently. Does someone have a quick summary on where it fits into the Universe? Thanks, -ans. -- _______________________________________________________________________________ Ajay Shah, (213)734-3930, ajayshah@usc.edu The more things change, the more they stay insane. _______________________________________________________________________________
billk@hawk.cs.ukans.edu (Bill Kinnersley) (04/18/91)
In article <32012@usc> ajayshah@alhena.usc.edu (Ajay Shah) writes:
:
: I came across Scheme recently. Does someone have a quick summary on
: where it fits into the Universe?
:
From The Language File:
Scheme - A dialect of LISP that is applicative-order and lexically scoped.
Unlike all other LISP dialects, Scheme treats both functions and
continuations as first-class objects. "The REvised^3 Report on the
ALgorithmic Language Scheme", G.L. Steele Jr, SIGPLAN Notices 21(12):37-79
(Dec 1986).
mailing list: scheme@mc.lcs.mit.edu
--
--Bill Kinnersley
billk@hawk.cs.ukans.edu
226 Transfer complete.
kend@data.UUCP (Ken Dickey) (04/18/91)
ajayshah@alhena.usc.edu (Ajay Shah) writes: >I came across Scheme recently. Does someone have a quick summary on >where it fits into the Universe? From the IEEE draft standard (P1178/D4): Programming languages should not be designed by piling feature upon feature, but by removing the weaknesses and restrictions that make additional features appear necessary. Scheme is a small, elegant language which inherits from both Algol and Lisp language families. Scheme is lexically scoped (Algol style block structured scoping). Scheme has "typed values" as opposed to "typed variables" (Lisp style `dynamic' typing). The language is extremely regular. All data objects including procedures and continuations have "first class" status in that they can be stored in variables, passed as parameters, returned as results, don't have to be named, etc. The syntax is trivial (s-expressions). Scheme uses the same rules of evaluation for operators as for operands. E.g.: ((if (foo? x) + *) 32 X 37) {i.e. if foo?(X) is true, apply '+' to arguments 32, X, and 37, else apply '*' to them. The outer operator is returned by the IF statement} Scheme directly sypports imperative, functional, and object based programming styles. Doing a full object-system with multiple inheritance, etc. on top of raw Scheme is about 8-12 pages of code. Numbers are a unified tower of types. An integer is a rational is a real is a complex. Data types include boolean, list, vector, string, character, symbol, procedure, and number. Scheme is "properly tail recursive", which means that `tail-recursive' loops are iterative--they execute in constant space. Procedure calls are essentially gotos, so no special iteration constructs are required--loops are expressed directly using procedure call semantics. Again, Scheme is a very small language. The programming language report is about 50 pages. ;;====================================================================== ;; A couple of quick examples: ; Recursive factorial (define (FACTORIAL N) (if (< n 2) 1 (* n (factorial (- n 1))))) ; 'Continuation-passing' factorial -- also recursive (define (FACTORIAL N) (define (cfact n k) ; internal procedure -- k is a function (if (< n 2) (k 1) (cfact (- n 1) (lambda (value) (k (* n value)))) ; generate a new function.. ) ) ; which tells us what.. ; to do with the.. ; result when we get it. ; body (cfact n (lambda (any) any)) ; start things off with the identity function ) ; Iterative factorial (define (FACTORIAL N) (define (fact n result) ; internal procedure (if (< n 2) result (fact (- n 1) (* n result))) ;; this is a loop ) ; body (fact n 1) ) ; Iterative factorial -- another way of writing the above (define (FACTORIAL N) (let loop ( (n N) (result 1) ) (if (< n 2) result (loop (- n 1) (* n result)) ) ) ) ;;----------------------------E-O-F---------------------------------;;
barmar@think.com (Barry Margolin) (04/18/91)
In article <32012@usc> ajayshah@alhena.usc.edu (Ajay Shah) writes: >I came across Scheme recently. Does someone have a quick summary on >where it fits into the Universe? Scheme is a dialect of Lisp that was designed to have very pure semantics and support programming languages research and education. It was originally developed by Guy Steele and Gerald Sussman at MIT in the mid-70's. Here are some relevant excerpts from the introduction to the "Revised**3 Report on the Algorithmic Language Scheme", which defines the language and I believe is available from the MIT Artificial Intelligence Laboratory. Scheme demonstrates that a very small number of rules for forming expressions, with no restrictions on how they are composed, suffice to form a practical and efficient programming language that is flexible enough to support most of the major programming paradigms in use today. Scheme was one of the first programming languages to incorporate first class procedures as in the lambda calculus, thereby proving the usefulness of static scope rules and block structure in a dynamically typed language. Scheme was the first major dialect of Lisp to distinguish procedures from lambda expressions and symbols, to use a single lexical environment for all variables, and to evaluate the operator position of a procedure call in the same way as an operand position. By relying entirely on procedure calls to express iteration, Scheme emphasized the fact that tail-recursive procedure calls are essentially goto's that pass arguments. Scheme was the first widely used programming language to embrace first class escape procedures, from which all known sequential control structures can be synthesized. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar
av@kielo.uta.fi (Arto V. Viitanen) (04/18/91)
>>>>> On 17 Apr 91 07:10:58 GMT, ajayshah@alhena.usc.edu (Ajay Shah) said:
Ajay> Nntp-Posting-Host: alhena.usc.edu
Ajay> Originator: ajayshah@alhena.usc.edu
Ajay> I came across Scheme recently. Does someone have a quick summary on
Ajay> where it fits into the Universe?
Scheme is a programming language (ok, the programming language for some of
you :-) ) which is statically scoped and properly tail-recursive dialect of
Lisp programming language. It is invented by by Guy Lewis Steele Jr. and
Gerald Jay Sussman. It can support imperative, functional and message passing
(object oriented) programming paradigms.
You can learn more about Scheme from ``Revised^3.99 Report on Algorithmic
Language Scheme'', ed. by William Clinger and Jonathan Rees, Department of
Computer and Information Science, University of Oregon, CIS-TR-90-02.
--
Arto V. Viitanen email: av@kielo.uta.fi
University Of Tampere, av@ohdake.cs.uta.fi
Finland
jbc@hpcupt3.cup.hp.com (Jeff Caldwell) (04/19/91)
>I came across Scheme recently. Does someone have a quick summary on >where it fits into the Universe? > >Thanks, > > -ans. Scheme is a powerful dialect of Lisp. I believe it was developed at MIT. -Jeff Caldwell | HP Calif. Lang. Lab.
goer@ellis.uchicago.edu (Richard L. Goerwitz) (04/30/91)
jbc@hpcupt3.cup.hp.com (Jeff Caldwell) writes: >>I came across Scheme recently. Does someone have a quick summary on >>where it fits into the Universe? > >Scheme is a powerful dialect of Lisp. I believe it was developed at MIT. Check one: _ Scheme is primarily an instructional language, with a very pure and simple syntax, and with precious little in the way of resources that would make it a viable production language. _ Scheme is rapidly emerging, in various forms, as a viable alternative to its bloated cousins (e.g. CL). Although it is not used in many production systems just yet, it soon will be. -- -Richard L. Goerwitz goer%sophist@uchicago.bitnet goer@sophist.uchicago.edu rutgers!oddjob!gide!sophist!goer