Re: [racket-dev] A Const type constructor

2012-07-31 Thread Neil Toronto
On 07/25/2012 07:10 PM, D Herring wrote: On 07/25/2012 12:29 PM, Neil Toronto wrote: What if TR had a notion of const-ness, like in C? Suppose (Vectorof A) is a subtype of (Const-Vectorof B) when A is a subtype of B, and (Const-Vectorof A) is never a subtype of (Vectorof B). In C, const is a

Re: [racket-dev] A Const type constructor

2012-07-31 Thread Matthias Felleisen
On Jul 31, 2012, at 1:31 PM, Neil Toronto wrote: To reiterate after my absence: I won't write a typed math/vector until using its exports in Typed Racket wouldn't be a huge friggin' PITA. Let me rephrase this ever so gently. Typed Racket has failed at least one real test for now, namely,

Re: [racket-dev] A Const type constructor

2012-07-31 Thread Vincent St-Amour
At Tue, 31 Jul 2012 14:36:06 -0400, Matthias Felleisen wrote: On Jul 31, 2012, at 1:31 PM, Neil Toronto wrote: To reiterate after my absence: I won't write a typed math/vector until using its exports in Typed Racket wouldn't be a huge friggin' PITA. Let me rephrase this ever so

Re: [racket-dev] A Const type constructor

2012-07-25 Thread Sam Tobin-Hochstadt
On Wed, Jul 25, 2012 at 9:29 AM, Neil Toronto neil.toro...@gmail.com wrote: After thinking about it, I don't want an Immutable-Vector type, for which v : Immutable-Vector proves (immutable? v) is #t. That would be seriously annoying to users of a vector library. What if TR had a notion of

Re: [racket-dev] A Const type constructor

2012-07-25 Thread Neil Toronto
On 07/25/2012 10:26 AM, Sam Tobin-Hochstadt wrote: On Wed, Jul 25, 2012 at 9:29 AM, Neil Toronto neil.toro...@gmail.com wrote: After thinking about it, I don't want an Immutable-Vector type, for which v : Immutable-Vector proves (immutable? v) is #t. That would be seriously annoying to users of

Re: [racket-dev] A Const type constructor

2012-07-25 Thread D Herring
On 07/25/2012 12:29 PM, Neil Toronto wrote: What if TR had a notion of const-ness, like in C? Suppose (Vectorof A) is a subtype of (Const-Vectorof B) when A is a subtype of B, and (Const-Vectorof A) is never a subtype of (Vectorof B). In C, const is a contract on the function type, not on the