[plt-scheme] "appending" to classes rather than extending

From: YC (yinso.chen at gmail.com)
Date: Wed Mar 5 21:22:56 EST 2008

> ** What I'm actually working on is a web app library, where the
> implementations of the functions in the library depend on a runtime
> value (i.e., the web server request). So, e.g., current-user might be
> a function in the library, and it *won't* require a request as an
> argument -- it's "built-in" dynamically.  I also want clients of the
> library to be able to override any of the default implementations of
> the library functions.  This library, btw, is my attempt at striking a
> balance in the library vs framework war.

I have attempted to do similar things (if I read your email correctly) and
my approach involves uses of parameters.  The parameters contain a set of
default implementations, and users can override them as necessary.  Not sure
if that'll match your needs, though.

Regards,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20080305/c6af5138/attachment.html>

Posted on the users mailing list.