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 #54

cc


    

changetime

2011-01-24 08:13:25

component

WG1 - Core

description

Scheme's primitive mechanism of improper lambda-lists allows for optional arguments, but only with extra machinery.  CL, DSSSL, and some Schemes provide a special word such as `#!optional` in lambda-lists, showing that the arguments which follow are optional and may have default values.  SRFI 16 (`case-lambda`) is an alternative method of providing for optional arguments: it allows a procedure to define multiple lambda-lists each of different lengths, with separate bodies for each.  This is like method overloading, but without types.

id

54

keywords


    

milestone


    

owner

alexshinn

priority

major

reporter

cowan

resolution

wontfix

severity


    

status

closed

summary

optional arguments

time

2010-05-02 23:24:09

type

defect

Changes

Change at time 2011-01-24 08:13:25

author

cowan

field

comment

newvalue


    

oldvalue

6

raw-time

1295828005000000

ticket

54

time

2011-01-24 08:13:25

Change at time 2011-01-24 08:13:25

author

cowan

field

resolution

newvalue

wontfix

oldvalue


    

raw-time

1295828005000000

ticket

54

time

2011-01-24 08:13:25

Change at time 2011-01-24 08:13:25

author

cowan

field

status

newvalue

closed

oldvalue

reopened

raw-time

1295828005000000

ticket

54

time

2011-01-24 08:13:25

Change at time 2011-01-24 08:13:10

author

cowan

field

comment

newvalue


    

oldvalue

5

raw-time

1295827990000000

ticket

54

time

2011-01-24 08:13:10

Change at time 2011-01-24 08:13:10

author

cowan

field

resolution

newvalue


    

oldvalue

fixed

raw-time

1295827990000000

ticket

54

time

2011-01-24 08:13:10

Change at time 2011-01-24 08:13:10

author

cowan

field

status

newvalue

reopened

oldvalue

closed

raw-time

1295827990000000

ticket

54

time

2011-01-24 08:13:10

Change at time 2010-10-18 02:36:49

author

cowan

field

comment

newvalue

The WG voted to refer optional-argument support (excluding case-lambda, which is #78) to WG2.

oldvalue

4

raw-time

1287344209000000

ticket

54

time

2010-10-18 02:36:49

Change at time 2010-10-18 02:36:49

author

cowan

field

resolution

newvalue

fixed

oldvalue


    

raw-time

1287344209000000

ticket

54

time

2010-10-18 02:36:49

Change at time 2010-10-18 02:36:49

author

cowan

field

status

newvalue

closed

oldvalue

new

raw-time

1287344209000000

ticket

54

time

2010-10-18 02:36:49

Change at time 2010-05-17 15:13:57

author

medernac

field

comment

newvalue

I am also in favor of Case-Lambda syntax provided as a macro.

oldvalue

3

raw-time

1274084037000000

ticket

54

time

2010-05-17 15:13:57

Change at time 2010-05-10 03:49:59

author

arcfide

field

comment

newvalue

I also prefer the CASE-LAMBDA in the standard. I think that it is easy to add in optional keyword arguments using records or the like, so I don't see a need for them to be in the standard. I'm not sure that CASE-LAMBDA is a suitable addition to WG1 though.

oldvalue

2

raw-time

1273438199000000

ticket

54

time

2010-05-10 03:49:59

Change at time 2010-05-02 23:27:46

author

cowan

field

comment

newvalue

I think it's important to have a simple approach to optional arguments.  Programmers often want them, although it's difficult to count such instances because so much code just cracks the lambda-list-tail variable.  Such code is often brittle, simply ignoring excess optional arguments even if the surrounding Scheme implementation reports errors on them.

The #!optional keyword requires special magic in the lambda form.   Case-lambda can be provided directly by a syntax-rules macro, and therefore I prefer it.

oldvalue

1

raw-time

1272817666000000

ticket

54

time

2010-05-02 23:27:46