Kon (and others),

On Sep 1, 2006, at 10:59 AM, Kon Lovett wrote:

But Felix's point about 'ensure' should help w/ syntax forms that have domain & range restrictions.

Yeah---that would be The Right Way (TM). (And it allows for more situation-adapted tests.)

By the way (maybe felix can answer this), if I define a structure with

(define-record foo bar baz)

does it define the accessors and setters as

(define (foo-bar f)
  (ensure foo? f)
  (block-ref f 0))
...

I'm curious because I've read in other places (one of Manuel Serrano's papers on type inference) that type checks can take up a large fraction of the runtime, and it would be nice to eliminate as many as possible in (unsafe) code.

Will


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to