Slashdot Mirror


Draft Scheme Standard R6RS Released

Watson Ladd writes, "The new version of the official Scheme standard has been released as a draft (PDF)." From the draft: "[This] report gives a defining description of the programming language Scheme. Scheme is a statically scoped and properly tail-recursive dialect of the Lisp programming language invented by Guy Lewis Steele Jr. and Gerald Jay Sussman. It was designed to have an exceptionally clear and simple semantics and few different ways to form expressions. A wide variety of programming paradigms, including imperative, functional, and message passing styles, find convenient expression in Scheme."

13 of 235 comments (clear)

  1. For Language Enthusiasts by RAMMS+EIN · · Score: 4, Informative

    Scheme is a language that every programming language enthusiast should know. Being both simple and flexible, it's suitable for communicating and explaining all kinds of concepts. A lot of books and papers are about Scheme or use Scheme for examples or teaching (see Readscheme.org). Scheme also pioneered some of the concepts in modern programming languages (such as lexical scoping), as well as several uncommon features (such as hygienic macros and first-class continuations). There are many Scheme implementations, some tiny, some slow, some fast, some with extensive libraries, some which interface to other programming languages, etc. etc.

    --
    Please correct me if I got my facts wrong.
    1. Re:For Language Enthusiasts by TheRaven64 · · Score: 3, Informative
      Scheme is a language that every programming language enthusiast should know.

      No, it (or some other Lisp dialect) is a language that every programmer should know. Every programmer should know Lisp, Smalltalk, and either C or some dialect of assembly language (ideally both). As a bonus, they should also know Haskell and Prolog. Once you know these languages, it is trivial to pick up any other. I would also recommend Erlang; not because it's a particularly good example of anything, but just because it's a real joy to work with.

      --
      I am TheRaven on Soylent News
  2. Re:Qs by CRCulver · · Score: 4, Informative

    The GNU project adopted Scheme (with the Guile interpreter) as its official scripting language. Applications are not meant to be written in Scheme, but applications can expose functionality to the user through a Scheme interface. That is to say, plugins for extensible applications could be written in Scheme. The Gimp is one of the most noteworthy applications with a Scheme interface, and much of the lower-level functionality of GNU Lilypond is reached with Scheme.

  3. Re:Qs by brilinux · · Score: 2, Informative

    Hmmm... you will need libraries and such for that, though some people do use Scheme for all of those things (see http://www.plt-scheme.org/ and http://www-sop.inria.fr/mimosa/fp/Bigloo/). I have personally used it for web applications, though I usually use common lisp and ocaml for that. In fact, if you are looking for an alternative to C++, Java, or Python, I must recommend OCaml. Look at this book. In fact, I wrote an interpreter for R5RS in OCaml...

  4. Scheme and Common Lisp... by mav[LAG] · · Score: 2, Informative

    are both tools of beauty that have taught me more about programming and problem-solving than all other languages combined. SICP and PAIP are both classics in this regard that everyone should rush out and get now.

    It's just such a pity that, since they're both standards which anyone can implement, lots of people do, and as a result, finding one you like and then getting it to talk to other languages and libraries can be a very frustrating experience. And languages like Python with one canonical implementation driven by a BDFL and with exceptional library support are just getting more Lisp-like, which can't be good news for for a renaissance in Lisp or Scheme. Pity really, since I really like 'em both...

    --
    --- Hot Shot City is particularly good.
  5. Tail Recursion by RAMMS+EIN · · Score: 5, Informative

    For those of you who don't know what "properly tail recursive" means, a quick explanation. Consider the following code:

    (define (f x) (x x))
    (f f)

    This defines a function, f, which takes one argument, x, which should be a function (yay, first-class functions!), and calls x upon itself. Then, it calls f on f.

    Of course, this will cause f to call f upon itself. Again. And again. Infinite recursion!

    Now, proper tail recursion means that if a function call returns in tail position (meaning it is the last thing the surrounding function does before it returns), the activation frame for the surrounding function is replaced by that of the function it calls. Contrast this with normal recursion, where a _new_ activation frame would be created for the called function.

    Tail recursion makes the example code above run in bounded memory...looping forever. :-)

    --
    Please correct me if I got my facts wrong.
  6. Description of differences here by billstewart · · Score: 2, Informative
    If you RTFA and follow a few obvious links, you get to The R6RS Status Report which gives a relatively concise overview of the changes from R5 to R6.


    Since Scheme wasn't the one of the versions of LISP that I learned back in the dark ages, I couldn't really follow the subtleties of which changes are really significant, but it looks like it would make sense if you were following Scheme.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  7. Re:Hurray! by WilliamSChips · · Score: 2, Informative

    Functions in Forth are at the end, in Lisp are at the beginning.

    --
    Please, for the good of Humanity, vote Obama.
  8. Um. by Estanislao+Mart�nez · · Score: 2, Informative

    ;;;
    ;;; Macro to increment a variable by one.
    ;;;
    ;;; Usage:
    ;;;
    ;;; (define a 5)
    ;;; (inc! a)     ; a is now 6
    ;;;
    (define-syntax inc!
      (syntax-rules ()
        ((inc! x)
         (set! x (+ x 1)))))

    Not that idiomatic Scheme code will do this very often.  Langauges like Java or C use "++a" most often for loop indexes.  Looping in Scheme is typically driven off data structures.

  9. Re:What's with naming these days? by siride · · Score: 2, Informative

    From Wikipedia: "Scheme started as an attempt to understand Carl Hewitt's Actor model.[1] Scheme was originally called "Schemer", in the tradition of other Lisp-derived languages like Planner or Conniver. The current name resulted from the authors' use of the ITS operating system, which limited filenames to two components of at most six characters each. Currently, "Schemer" is commonly used to refer to a Scheme programmer."

  10. Learn Scheme by borgboy · · Score: 3, Informative

    I am sure there are a numer of ways to learn Scheme if you are interested. Here's one: follow the CS-61A course podcast of Brian Harvey's class at Berkeley.

    --
    meh.
    1. Re:Learn Scheme by Breakfast+Pants · · Score: 4, Informative

      Here's another(video lectures). Make sure to read the book as well. Both the book and the videos are free.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
  11. Re:Qs by Anonymous Coward · · Score: 1, Informative

    >>even trivial tasks like a for-loop you have to either code yourself or rely on non-portable extensions.

    WRONG!

    From the R5RS documentation:
            'Do' is an iteration construct. It specifies a set of variables to be bound, how they are to be initialized at the start, and how they are to be updated on each iteration. When a termination condition is met, the loop exits after evaluating the s. ...

    (do ((vec (make-vector 5))
              (i 0 (+ i 1)))
            ((= i 5) vec)
        (vector-set! vec i i))

    http://www-swiss.ai.mit.edu/~jaffer/r5rs_6.html#SE C36