This is not only in your opinion. If you do this in R5RS or R6RS , both do not behave the same, this is a report violation. In racket (r5rs implementation), it probably breaks, since I checked them with plt-r5rs , and it obviously doesn't loop forever.
#lang racket (the default language for the implementation of racket ) does not comply with any standard, therefore, like perl5 , how it behaves is a specification. Their documentation writes a lot about tag hints , which reduces the amount of continuation.
arguments against call / cc that come to mind when reading this question. I think the interesting part is:
It is said that call / cc implemented in real Scheme systems never captures the whole continuation in any case: many Scheme systems are an implicit control delimiter around REPL or threads. These implicit delimiters are easily noticeable: for example, in Petite Chez or Scheme 48, code
(let ((k0
prints an endless stream of zeros. If we put each operation on it (evaluated by its own REPL):
(define k0
the output is simple 0 #f.
I'm not sure that I am against call/cc as a primitive (I believe that your tools should give you the opportunity to shoot in the foot). I feel that I can change my mind after writing the Scheme compiler, although I will return to it when I find it.
source share