From 97f087a391083064e2cfe20778acd5a497c1d190 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Mon, 26 May 2014 18:47:17 -0600 Subject: [PATCH] Update SCG section based on Sam-TH and Greg's comments --- .../scribblings/reference/eval-model.scrbl | 23 ++++++++++++------- .../scribblings/reference/reference.scrbl | 14 ++++++++++- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/pkgs/racket-pkgs/racket-doc/scribblings/reference/eval-model.scrbl b/pkgs/racket-pkgs/racket-doc/scribblings/reference/eval-model.scrbl index 9a81dd6be4..0d4c9f82d3 100644 --- a/pkgs/racket-pkgs/racket-doc/scribblings/reference/eval-model.scrbl +++ b/pkgs/racket-pkgs/racket-doc/scribblings/reference/eval-model.scrbl @@ -622,18 +622,18 @@ internal effects is not detectable outside of the Racket program. External effects are exemplified by input/output (or I/O). I/O is the action of a function such as @racket[tcp-connect], which communicates with the operating system to send network packets outside of the -machine running Racket via the electromagnetic spectrum. The -transmission of these packets is observable outside of Racket, in -particular by the receiver computer or any routers in -between. External effects exist to be detectable outside of the Racket -program and are often detectable using physical processes. +machine running Racket. The transmission of these packets is +observable outside of Racket, in particular by the receiver computer +or any routers in between. External effects exist to be detectable +outside of the Racket program and are often detectable using physical +processes. An effect is @deftech{discarded} when it is no longer detectable. For instance, a mutation of a box from @racket[3] to @racket[4] would be discarded if it ceases to be detectable that it was ever changed, and thus would still contain @racket[3]. Because external effects are -intrinsically observable outside of Racket, they cannot be discarded, -because Racket lacks a time-reversal mechanism. +intrinsically observable outside of Racket, they are irreversible and +cannot be discarded. Thus, The Separate Compilation Guarantee only concerns effects like mutation, because they are exclusively effects "on the Racket runtime @@ -671,7 +671,7 @@ compilation of one module to have already compiled a different module. In particular, if module A is shared by the phase 1 portion of modules X and Y, then any internal effects while X is compiled are not visible during the compilation of Y, regardless of whether X and Y are -compiled during the same Racket runtime system. +compiled during the same execution of Racket's runtime system. The following set of modules demonstrate this guarantee. First, we define a module with the ability to observe effects via a @@ -738,6 +738,13 @@ In contrast, if these modules were changed to store the value of @racket[b] in a file on the filesystem, then the program would only display @litchar["2"]. +The Separate Compilation Guarantee is described in more detail +in "Composable and Compilable Macros" @cite["Flatt02"], including +informative examples. The paper "Advanced Macrology and the +implementation of Typed Scheme" @cite["Culpepper07"] also contains an +extended example of why it is important and how to design effectful +syntactic extensions in its presence. + @;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @subsection[#:tag "cross-phase persistent-modules"]{Cross-Phase Persistent Modules} diff --git a/pkgs/racket-pkgs/racket-doc/scribblings/reference/reference.scrbl b/pkgs/racket-pkgs/racket-doc/scribblings/reference/reference.scrbl index 3bc8fe5378..74bd9fc465 100644 --- a/pkgs/racket-pkgs/racket-doc/scribblings/reference/reference.scrbl +++ b/pkgs/racket-pkgs/racket-doc/scribblings/reference/reference.scrbl @@ -85,6 +85,12 @@ The @racketmodname[racket] library combines #:title "ISO/IEC 9899:1999 Cor. 3:2007(E))" #:date "2007") + (bib-entry #:key "Culpepper07" + #:author "Ryan Culpepper, Sam Tobin-Hochstadt, and Matthew Flatt" + #:title "Advanced Macrology and the Implementation of Typed Scheme" + #:location "Workshop on Scheme and Functional Programming" + #:date "2007") + (bib-entry #:key "Danvy90" #:author "Olivier Danvy and Andre Filinski" #:title "Abstracting Control" @@ -103,6 +109,12 @@ The @racketmodname[racket] library combines #:location "LISP and Functional Programming" #:date "1988") + (bib-entry #:key "Flatt02" + #:author "Matthew Flatt" + #:title "Composable and Compilable Macros: You Want it When?" + #:location "International Conference on Functional Programming (ICFP)" + #:date "2002") + (bib-entry #:key "Friedman95" #:title "Exception system proposal" #:author "Daniel P. Friedman, C. T. Haynes, and R. Kent Dybvig" @@ -186,7 +198,7 @@ The @racketmodname[racket] library combines (bib-entry #:key "Strickland12" #:title "Chaperones and Impersonators: Run-time Support for Reasonable Interposition" #:author "T. Stephen Strickland, Sam Tobin-Hochstadt, Matthew Flatt, and Robert Bruce Findler" - #:location "Object-Oriented Programming, Systems, and Languages (OOPSLA" + #:location "Object-Oriented Programming, Systems, and Languages (OOPSLA)" #:url "http://www.eecs.northwestern.edu/~robby/pubs/papers/oopsla2012-stff.pdf" #:date "2012") )