...
Running the following program with DrRacket BC gives other results than DrRacket CS.
Can someone tell me why? Is the difference intended? Thanks.
...
#lang racket/base
; version 8.6 ; windows 10 enterprise
; runs differently on BC and CS.
(struct function (f)
#:inspector (make-sibling-inspector)
#:constructor-name make-function
#:property prop:procedure 0)
(define-syntax-rule (catch expr)
(with-handlers
((exn:fail?
(λ (exn)
(fprintf
(current-error-port)
"~a~n"
(exn-message exn)))))
expr))
(define namespace (make-base-namespace))
(define call/wv
(namespace-variable-value
'call-with-values
#t
(λ () (writeln 'schapen))
namespace))
(define (tag x) (printf "~n~s~n" x))
(define (thunk) (values 1 2 3))
(tag 'aap) ; ok in both CS and BC
(call/wv thunk list)
(tag 'noot) ; exception in CS, ok in BC
(catch (call/wv thunk (make-function list)))
(tag 'mies) ; exception in CS, ok in BC
(catch (call/wv (make-function thunk) list))
(tag 'wim) ; exception in CS, ok in BC
(catch (call/wv (make-function thunk) (make-function list)))
(tag 'zus) ; #f in CS, #t in BC
(eq? call-with-values call/wv)