At Mon, 5 Nov 2018 16:26:16 -0600, Alexis King wrote:
> To provide an example, `racket/contract` exports a value called
> `the-unsupplied-arg`, which is created using the usual structure type
> generativity trick:
>
> (define-struct the-unsupplied-arg ())
> (define the-unsupplied-arg
On 11/6/18 11:31 AM, Alexis King wrote:
On Nov 5, 2018, at 20:01, Ryan Culpepper wrote:
You could use a chaperone to prohibit `struct-info`
Good point! I had forgotten that `struct-info` is a chaperoneable operation.
This isn’t ideal, though, since I don’t think `struct-info` is ever
> On Nov 5, 2018, at 20:01, Ryan Culpepper wrote:
>
> You could use a chaperone to prohibit `struct-info`
Good point! I had forgotten that `struct-info` is a chaperoneable operation.
This isn’t ideal, though, since I don’t think `struct-info` is ever actually
supposed to raise an error, it’s
A variant on Alexis' example lets you circumvent Typed Racket's protections:
#lang racket
(module typed typed/racket
(provide wrapper use)
(struct wrapper ([v : Integer]))
(: use (-> wrapper Integer))
(define (use w)
(add1 (wrapper-v w
(require racket/runtime-path)
On 11/5/18 5:26 PM, Alexis King wrote:
To my knowledge, there are two main techniques for creating unique values in
Racket: `gensym` and structure type generativity. The former seems to be
bulletproof — a value created with `gensym` will never be `equal?` to anything
except itself – but the
To my knowledge, there are two main techniques for creating unique values in
Racket: `gensym` and structure type generativity. The former seems to be
bulletproof — a value created with `gensym` will never be `equal?` to anything
except itself – but the latter isn’t. Using reflective operations,
6 matches
Mail list logo