Talk:Scheme (programming language)

message: I think the example shown under ‘proper tail recursion’ does not actually use tail recursion because the call to the loop function is not directly returned from the function. The return value is instead passed to a call to ‘cons’ which would mean it has to maintain the call stack and can't optimise away the call. I think it would have to be something like this to use tail-call recursion:
(define (list-of-squares n)
  (let loop ((i n) (res '()))
    (if (< i 0)
        res
        (loop (- i 1) (cons (* i i) res)))))
Bpeel (talk) 16:04, 27 November 2012 (UTC)
thread_title:  Tail-recursion example is not tail-recursive 

message: "Each comment is preceded by a semicolon (;) and extends for the rest of the line. Some implementations allow comments to span multiple lines by wrapping them with a #|...|# (possibly nested). Other implementations allow an entire s-expression to be commented out by prepending it with #;.[7] These two comment forms are included in the R6RS."
Three kinds of comments are described, but the last sentence mention only two forms. I don't know which form are referenced. Could anybody make it clearer please ? Halladba (talk) 22:22, 1 December 2008 (UTC)
replies: text: the last two must be the new ones from R6RS because R5RS only has the (;) whole-line comments. --MarSch (talk) 16:30, 20 July 2009 (UTC)

text: Rscheme is a really notable scheme system. It has a well implemented garb. I'll see if I can add it in a proper place. Rursus dixit. (mbork3!) 21:00, 23 May 2011 (UTC)
thread_title:  Comments 

message: I believe I heard at MIT that Scheme was used on one of the Mars rovers.  Ten points to anyone who can find a reliable reference.  8)  -- Beland (talk) 00:43, 18 July 2009 (UTC)
thread_title:  Used on Mars rover 

message: This article has been a mess for some time, and I'm planning an expansion, with possibly a rewrite of much of the article.
Some recent developments in Scheme standardization should be covered (see http://scheme-reports.org/).  R6RS has divided Schemers more than any other event in the history of the language, and the Scheme Steering Committee has proposed that two Scheme versions should be specified: a small language more akin to R5RS, and a larger language closer to R6RS.
Meanwhile the coverage of key concepts is poorly handled.  The following key language features need to be covered correctly:
* Continuations
* Hygienic macros
* Multiple values
* Numeric tower
* Proper tail calls
The article should integrate with lisp (programming language) so that basic lisp concepts covered adequately in that article (lists, consing, etc) are not dwelt on here.
The SRFI process should be covered in more depth.
The Steering Committee recently remarked that "Scheme has the unhappy distinction of being the world's most unportable programming language" , and this undeniable fact isn't really covered here at all.  Their point is that if you want to write in Scheme, you have to choose a particular implementation, and having done that you will find that most of the software you write for that implementation will not run unaltered on other implementations. --TS 03:42, 13 October 2009 (UTC)
thread_title:  Expansion needed 

message: It's hard to avoid the temptation to turn an encyclopedia article on a programming language into a miniature tutorial for the language.  The "Language elements" section is messy and some parts of it need to be rewritten and other parts need to be incorporated elsewhere--as I have already done with some sections. --TS 16:09, 14 October 2009 (UTC)
thread_title: Language elements

message: I've removed the following for now:
:  Chez Scheme has been used at Disney World in Florida for controlling virtual rides.
The citation given for this was "Kent Dybvig, invited to talk at the International Conference on Functional Programming, 2006."  We need better sourcing than that. --TS 19:06, 20 October 2009 (UTC)
thread_title: Disney World

message: The following section was removed from the article Boolean data type:begin removed text
----
----
Scheme has two special symbols #t and #f which represent the logical values of true and false respectively. However, any non-#f value is interpreted as true. Note that unlike Lisp, nil or '(), the empty list, is separate from #f in Scheme, and therefore is considered true.
----
----
end removed textIs there a place for this text in the Scheme-related articles? Perhaps in the Wikibook? Thanks, and all the best, --Jorge Stolfi (talk) 00:08, 31 December 2009 (UTC)
replies: text: Thanks for this. I think we already cover it all in the present article, but it might be useful for the book (which was rather moribund last time I checked). --TS 00:10, 31 December 2009 (UTC)
thread_title:  Stuff removed from Boolean data type article 

message: I've reverted this edit which was based on an opinion stated in the edit summary: "Forth is even easier to implement, and has as much power from further readily available extensions."
This isn't because I want to engage in a debate on the relative power of Forth and Scheme (that isn't what we do here at Wikipedia) but because I think it's bad form to insert personal opinion into articles.  For more on what is meant by "power" in the context of Scheme and other Lisps, read the "Fundamental design features" section.  Any language may be augmented to contain these features, but every standard-conforming implementation of Scheme provides them without the need for augmentation. --TS 17:57, 1 April 2010 (UTC)
replies: text: I've changed the word "power" to the wikilinked phrase expressive power,  This refers to the readiness with which complex data and control structures can be expressed in Scheme. --TS 18:07, 1 April 2010 (UTC)
thread_title: Forth

message: Theres a statement in the wording that SCHEME is the easiest language of comparable power to implement. Is this REALLY true? I've seen some DAMN slim versions of Forth, and although it was never as fashionable for its stack-y ways, it was always a pretty expressive language and surprisingly capable for the kind of metaprogramming the lisps where known for. 121.45.251.215 (talk) 12:07, 9 October 2011 (UTC)
thread_title:  Easiest to implement 

message: This sentence in the first paragraph seems completely meaningless: "Its compactness and elegance have made it popular with educators, language designers, programmers, implementors, and hobbyists."
Wouldn't it make sense to either simply state that "It is popular for its compactness", or to remove the overly broad and ambiguous "programmers, implementors, and hobbyists"? 174.1.213.234 (talk) 17:02, 20 May 2013 (UTC)
replies: text: Changing that. QVVERTYVS (hm?) 07:19, 19 July 2013 (UTC)
thread_title:  "Popular with programmers, implementors and hobbyists" 

message: IMHO the Hofstaedter example looks a bit ugly and seems not to be very scheme-like (besides letrec of course). It evaluates to #f and depends mostly on the side effects of display. Wouldn’t it be more appropiate if it evaluated e. g. to a list of pairs (female male) like this:
(define (hofstaedter-male-female n)
  (letrec ((female (lambda (n)
		     (if (= n 0)
			 1
			 (- n (male (female (- n 1)))))))
	   (male (lambda (n)
		   (if (= n 0)
		       0
		       (- n (female (male (- n 1))))))))
    (let loop ((i 0))
      (if (> i n)
	  '()
	  (cons (cons (female i)
		      (male i))
		(loop (+ i 1)))))))
(hofstaedter-male-female 8)
==> ((1 0) (1 0) (2 1) (2 2) (3 2) (3 3) (4 4) (5 4) (5 5))
It is of course a matter of taste and style, but functional parts of a program should be separated from imperative parts (cf. e. g. Conrad Barski, Land of Lisp, San Francisco 2011, p. 302). Displaying the results could be done with for-each, which according to R5RS is explicitly to be called because of its side-effects:
(for-each (lambda (item)
	    (begin
	      (display (car item))
	      (display " ")
	      (display (cdr item))
	      (display "\n")))
	  (hofstaedter-male-female 8))
===> #<unspecified>
1 0
1 0
2 1
2 2
3 2
3 3
4 4
5 4
5 5
Sokleidas (talk) 22:30, 7 November 2012 (UTC)
thread_title:  The Hofstaedter example 

message: What's up with that? The article seems out-of-date on that. Far as I can tell it's been delayed quite a bit, but then I don't follow Scheme news at all. --82.128.250.221 (talk) 10:19, 31 March 2014 (UTC)
replies: text: I've updated the panel on the right, as R7RS has been officially ratified. But we should also state that in the introduction, where R6RS is mentioned as the new standard. cslarsen (talk) 11:30, 29 December 2014 (UTC)
thread_title:  R7RS