Re: [racket-users] How much unsafety with unsafe-require/typed for polymorphic structs?

2018-05-03 Thread Sam Tobin-Hochstadt
In general, `unsafe-require/typed` is safe if the value you get from untyped code really does have that type. In your second example, that genuinely is true, so it's safe. But note that there are ways it can be trickier -- if a field is mutable but you pretend it's immutable, Typed Racket can go

[racket-users] How much unsafety with unsafe-require/typed for polymorphic structs?

2018-05-03 Thread Philip McGrath
I have some polymorphic struct types defined in untyped Racket that I'd like to be able to work with from Typed Racket. I see that struct type variables only work with `unsafe-require/typed`; I'm trying to understand just what unsafety I would be signing myself up for if I were to use that so I