This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.
Source for ticket #405
cc
changetime
2012-10-07 04:36:15
component
WG1 - Core
description
Currently there is no way to inspect an object to see if it's a promise. This proposal makes promises first-class by adding a `promise?` predicate. It also requires that if the argument to `make-promise` is a promise, it is returned without rewrapping it, and that if `force` is given a non-promise argument, it returns it unchanged. (These things cannot be provided by the user without a `promise?` predicate, and are trivial to provide with it.)
id
405
keywords
milestone
owner
cowan
priority
major
reporter
cowan
resolution
fixed
severity
status
closed
summary
Make promises first-class
time
2012-06-12 04:08:03
type
defect
Changes
Change at time 2012-10-07 04:36:15
author
cowan
field
comment
newvalue
oldvalue
9
raw-time
1349559375963396
ticket
405
time
2012-10-07 04:36:15
Change at time 2012-10-07 04:36:15
author
cowan
field
resolution
newvalue
fixed
oldvalue
raw-time
1349559375963396
ticket
405
time
2012-10-07 04:36:15
Change at time 2012-10-07 04:36:15
author
cowan
field
status
newvalue
closed
oldvalue
writing
raw-time
1349559375963396
ticket
405
time
2012-10-07 04:36:15
Change at time 2012-10-03 00:25:48
author
cowan
field
comment
newvalue
oldvalue
8
raw-time
1349198748934066
ticket
405
time
2012-10-03 00:25:48
Change at time 2012-10-03 00:25:48
author
cowan
field
status
newvalue
writing
oldvalue
decided
raw-time
1349198748934066
ticket
405
time
2012-10-03 00:25:48
Change at time 2012-10-03 00:25:42
author
cowan
field
comment
newvalue
WG1 decided to retract the above requirement.
oldvalue
7
raw-time
1349198742248539
ticket
405
time
2012-10-03 00:25:42
Change at time 2012-10-03 00:25:42
author
cowan
field
status
newvalue
decided
oldvalue
reopened
raw-time
1349198742248539
ticket
405
time
2012-10-03 00:25:42
Change at time 2012-09-19 10:52:13
author
cowan
field
comment
newvalue
Reopening part of the ticket to retract this requirement: "If force is given a non-promise argument, it returns it unchanged", because it conflicts with R6RS, which requires an error to be signalled.
oldvalue
6
raw-time
1348026733948684
ticket
405
time
2012-09-19 10:52:13
Change at time 2012-09-19 10:52:13
author
cowan
field
resolution
newvalue
oldvalue
fixed
raw-time
1348026733948684
ticket
405
time
2012-09-19 10:52:13
Change at time 2012-09-19 10:52:13
author
cowan
field
status
newvalue
reopened
oldvalue
closed
raw-time
1348026733948684
ticket
405
time
2012-09-19 10:52:13
Change at time 2012-09-19 10:50:48
author
cowan
field
comment
newvalue
oldvalue
5
raw-time
1348026648829635
ticket
405
time
2012-09-19 10:50:48
Change at time 2012-09-19 10:50:48
author
cowan
field
resolution
newvalue
fixed
oldvalue
raw-time
1348026648829635
ticket
405
time
2012-09-19 10:50:48
Change at time 2012-09-19 10:50:48
author
cowan
field
status
newvalue
closed
oldvalue
writing
raw-time
1348026648829635
ticket
405
time
2012-09-19 10:50:48
Change at time 2012-08-27 08:58:30
author
cowan
field
comment
newvalue
oldvalue
4
raw-time
1346032710094235
ticket
405
time
2012-08-27 08:58:30
Change at time 2012-08-27 08:58:30
author
cowan
field
owner
newvalue
cowan
oldvalue
alexshinn
raw-time
1346032710094235
ticket
405
time
2012-08-27 08:58:30
Change at time 2012-08-27 08:58:30
author
cowan
field
status
newvalue
writing
oldvalue
decided
raw-time
1346032710094235
ticket
405
time
2012-08-27 08:58:30
Change at time 2012-08-27 00:49:24
author
cowan
field
comment
newvalue
WG1 voted to add the `promise?` procedure without requiring promises to be disjoint.
oldvalue
3
raw-time
1346003364557674
ticket
405
time
2012-08-27 00:49:24
Change at time 2012-08-27 00:49:24
author
cowan
field
status
newvalue
decided
oldvalue
new
raw-time
1346003364557674
ticket
405
time
2012-08-27 00:49:24
Change at time 2012-06-13 06:09:55
author
cowan
field
comment
newvalue
Programmers can do the second two items themselves if the implementation provides
`promise?`, but they are simple and worth having. Combined with auto-forcing (with or without insta-forcing of constants), they provide what Per spoke of: laziness is explicit, eagerness is implicit, but the user has full control.
On the other hand, since auto-forcing is not required, there is only trivial cost to implementations who don't wish to provide it, namely the cost of making sure promises are a disjoint type and not just a special case of procedures.
I ran tests against the usual suite of Schemes:
Promises are not thunks, `force` returns any non-promise unchanged : Racket, Gauche, Gambit, Chicken, Chibi, STklos, RScheme, XLisp, UMB, Oaklisp, SXM
Promises are not thunks but can be invoked anyway, `force` returns any non-promise unchanged: !TinyScheme
Promises are not thunks, `force` rejects anything but a promise: Guile, SCM, !SigScheme, Elk, VX, Spark
Promises are thunks, `force` rejects anything else (presumably because it just invokes its argument): Scheme48/scsh, SISC, Chez, Vicare, Larceny, Ypsilon, Mosh, !IronScheme, Scheme 9, Dream, BDC, Schemik, Sizzle, Inlab
No force/delay support: KSi, Shoe, Scheme 7, Rep, Llava, Femtolisp, Dfsch
oldvalue
2
raw-time
1339542595230229
ticket
405
time
2012-06-13 06:09:55
Change at time 2012-06-13 05:22:00
author
cowan
field
comment
newvalue
oldvalue
1
raw-time
1339539720262837
ticket
405
time
2012-06-13 05:22:00
Change at time 2012-06-13 05:22:00
author
cowan
field
description
newvalue
Currently there is no way to inspect an object to see if it's a promise. This proposal makes promises first-class by adding a `promise?` predicate. It also requires that if the argument to `make-promise` is a promise, it is returned without rewrapping it, and that if `force` is given a non-promise argument, it returns it unchanged. (These things cannot be provided by the user without a `promise?` predicate, and are trivial to provide with it.)
oldvalue
Currently there is no way to inspect an object to see if it's a promise. This proposal makes promises first-class by adding a `promise?` predicate. It also requires that if the argument to `make-promise` is a promise, it is returned without rewrapping it.
raw-time
1339539720262837
ticket
405
time
2012-06-13 05:22:00