[plt-scheme] TypedScheme and the class.ss library

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sun Mar 18 19:53:15 EDT 2007

On Mar 18, 2007, at 7:08 PM, Henk Boom wrote:

> Hi list,
>
> I have just started using scheme this past winter, and I am really
> enjoying it. The one thing that always made me slightly uncomfortable,
> though, is the dynamic typing. Imaging my glee in hearing about
> TypedScheme, which looks exactly like what I want.

Thanks.

> Besides coming from a statically-typed background, I also come from a
> strong OOP background. For example, before learning Scheme, I spent
> about 6 months programming in Eiffel (which mixed two of the things I
> love, OOP and contracts (even properly inherited ones!)).


Not quite: see
  http://www.ccs.neu.edu/scheme/pubs/#oopsla01-ff
  http://www.ccs.neu.edu/scheme/pubs/#fse01-flf [easier to read]


> So I was looking into typed scheme, and it seems to support pretty
> much all the primitives, but because you need to use a special
> define-struct, it seems to me that the class.ss libraries would be
> off-limits for static typing. Is there a way around this? Am I missing
> something completely and does it actually just work? Would I have to
> write my own object system using define-typed-struct?

You would have to design your own type (sub)system for your OO PL
and make it work with our type system.

As you realize OOP is a library in PLT Scheme, mostly macros some  
functions. Properly supporting it would be one special case for a lot  
of things `macro.' So we're holding off on that until we know better.

I am consider an interface-only tack on this but who knows what will  
come out of it.


> Have a nice day,
>    Henk Boom
>
> P.S.: On a side note, I am somewhat interested in learning methods of
> organizing systems other than OOP. Most of my programs involve
> state-based worlds with objects interacting with each other, such as
> video games or other fun graphical applications. Where should I go to
> learn about alternate methods?

For the heck of it, take a look at

  http://www.ccs.neu.edu/home/matthias/HtDP/Prologue/book.html

-- Matthias





Posted on the users mailing list.