[plt-scheme] Looking for suggestions on how to approach an issue

From: Anthony Cowley (acowley at seas.upenn.edu)
Date: Thu Sep 17 19:13:45 EDT 2009

On Thu, Sep 17, 2009 at 6:53 PM, David Storrs <david.storrs at gmail.com> wrote:
> Requirements:
> All knowledge of how to connect, how to do the read / write calls,
> etc, should be encapsulated within the model.  The model should expose
> a generic interface that the controller can use to read / write data
> to whatever source.  Our original thought was to do a polymorphic OO
> system.
>
>
> We're starting to think that OO may have been the wrong approach, and
> are considering reworking the prototype.  No sacred cows--we're
> looking to optimize for programmer time.  I asked in the IRC channel
> and got two useful pointers:  typed scheme or contract regions, but it
> was also suggested to ask on list, so I'm asking.
>
> Any thoughts?  Anyone have experience doing anything like this?

I have a type class-like system built on Units that I intend to write
a blog post about. I can send you some very rough code for checking
out if you'd like. Since it uses signatures for type class
definitions, interface functions can be contracted. Instance
definitions are implemented as Units which are then passed to
functions that have type class constraints.

If you're not in a rush, I can shoot you an email once I've had a
chance to write a blog post about it.

Anthony


Posted on the users mailing list.