[plt-scheme] Questions about contracts
You mean this:
(module six mzscheme
(require |63|)
(define fred (make-array '#(#f) 8 8))
(define freds-diagonal (make-shared-array fred (lambda i (list
(car i) (car i))) 8))
(provide freds-diagonal))
Runs fine, too. You need to forgive Robby's English skills. He grew
up in Hawaii "-]
-- Matthias
On Apr 16, 2007, at 9:26 PM, Chongkai Zhu wrote:
> ----- Original Message -----
> From: "Matthias Felleisen" <matthias at ccs.neu.edu>
> To: "Chongkai Zhu" <czhu at cs.utah.edu>
> Cc: <plt-scheme at list.cs.brown.edu>
> Sent: Monday, April 16, 2007 7:04 PM
> Subject: Re: [plt-scheme] Questions about contracts
>
>
>> I think you're confusing an error (in PLT's contract system) with a
>> systemic flaw (in Eiffel's contract system).
>
> Yes, this might be correct. Sorry for the confusing, but my hunch
> is that this will take Robby quite some effort to fix.
>
>> Also, your error isn't repeatable:
>>
>> Welcome to DrScheme, version 369.9-svn13apr2007 [3m].
>> Language: (module ...).
>>> (define fred (make-array '#(#f) 8 8))
>>> (define freds-diagonal (make-shared-array fred (lambda (i) (list i
>> i)) 8))
>>>
>>
>> My hunch is that Robby fixed this.
>
> Sorry, but I'm using 369.9-svn14apr2007 [3m] now, and this error
> still happens.
>
> You are using the wrong language. The contract is only evoked by
> provide/contract. Obviously your interaction doesn't evoke any
> contract at all.
>
>> ;; ---
>>
>> If I misunderstand your point, please articulate it differently. --
>> Matthias
>>
>> P.S. In the mid-90s, someone in Edingburgh published a Tech Rpt on 60
>> + flaws in SML (1.0) type system. I still claim and say in public
>> that SML is a type-safe language.
>>
>>
>
> Chongkai