[Larceny-users] Ports' type changes unexpectedly

Derick Eddington derick.eddington at gmail.com
Fri Mar 20 14:50:15 EDT 2009


On Fri, 2009-03-20 at 09:27 +0000, David Rush wrote:
> I actually agree with WIll 100%, but since I'm currently studying and
> implementing some advanced type systems...
> 
> 2009/3/19 William D Clinger <will at ccs.neu.edu>:
> > Scheme is not a typed language.  Certain properties of an
> > object are immutable, but others may be mutable.
> 
> I can feel the breeze from your hands waving :)
> 
> Types are constraints relating to the values in a formal system. They
> provide a level of correctness guarantee that is directly related to
> the subject matter of the underlying constraint system. In principle
> (as in Scheme), there is no obligation to check constraints any time
> sooner than the application of a function to it's arguments.
> 
> So all of those lovely predicates in Scheme do produce a type-system
> of sorts, but the checking of the constraints is not performed in a
> static environment. In fact, Scheme's type-checking is "reflected"
> back to the programmer, modulo system primitives.
> 
> Looked at this way, having the set of constraints satisfied by a port
> after a close operation change is completely unsurprising. The Scheme
> "type system" is actually *richer* than in statically-typed languages,
> because you can express type constraints that are sensitive to data
> flow.

I've come to appreciate more and more the defining of everything in
terms of predicates which can do anything because it allows making
designs which nicely fit mental concepts and can smoothly evolve.  But
you still have to understand the design of the concepts, of course.

-- 
: Derick
----------------------------------------------------------------




More information about the Larceny-users mailing list