[plt-scheme] optional parameters?

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sat Sep 15 07:19:19 EDT 2007

Hi Troels,

> I'm using prometheus (
> http://planet.plt-scheme.org/package-source/daedalus/prometheus.plt/1/0/doc.txt
> )for creating objects, and it's working fine. However, I have a
> method, which I would like to give an optional argument. How can I
> make an argument optional, and how do I specify a default value for
> when it isn't supplied? Is it even possible, or should I use a
> different strategy?

It seems you got no answers on this one. Most likely because
very few people use this object system. (This is hard to
know as a newcomer)

There are two object systems builtin in PLT Scheme. The
first one (lib "class.ss") is Java-like with various
extension (among other inners from Beta).

    http://docs.plt-scheme.org/mzlib/mzlib-Z-H-6.html#node_chap_6

The other is Swindle, which is similar to CLOS (from Common Lisp).


If you want answer to the Prometheus question, the best
bet is to mail the author Jorgen Schaefer directly.
If you have questions on (lib "class.ss") or Swindle
there'll be plenty of help here.

-- 
Jens Axel Søgaard





Posted on the users mailing list.