[plt-scheme] keyword arguments (in v4.0, maybe)

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue Jun 12 17:41:02 EDT 2007

On Jun 12, 2007, at 4:27 PM, Eli Barzilay wrote:

> it must be easy to
>    add keywords to an existing function with no additional changes.
>    Matthias summarized it much nicer -- the problem is that adding
>    keywords to a function definition is a backward-incompatible
>    change.

Matthew, what is scary is that there are two levels of incompatibility:

1. going from 370+ to 4.0, people need to update existing software.  
We all know that the change is happening and so we need to do  
something about it.

2. Say you provide some package based on PLT version 5.3. A bunch of  
people like your package and import it. Now you discover that your  
function f, nicely defined with two args could benefit from two  
optional keyword args and so you change from

   #module big
     (define (f x y) ...)


   #module big
      (define (f x y #:left 8 #:right 72) ...)

No client package should have to notice anything and should work as  
is. After all, you have introduced opt keyword-based args. But the  
apply problem may necessitate a change to clients.

Perhaps I misunderstood the problem, but so has Eli then. -- Matthias

Posted on the users mailing list.