Yes, that’s right
And there’s lots of published work on Typed Racket, you might find Andrew Kent’s dissertation or PLDI 2016 paper more relevant to current typed Racket than my dissertation
Could someone explain the meaning of #mutable
? (struct foo (bar quux) #:transparent #:mutable)
Does this just mean we can use set!
on these?
like, only set! foo?
or like set-foo-bar as well?
It means you can use set-foo-bar!
can I do set-foo!
as well?
No, but you can use set-foo-quux!
thank you!!
In your example, the #:mutable means all fields are mutable.
I’ve noticed that rename-out
does not affect the object-name
of the value. Is this behavior intended?
yes, rename-out
is like (let ([x y]) ...)
— you have a new name to refer to y
with, but nothing about the value refered to by y
changes
I see.
(unrelated) If I reprovide a contracted value with contract-out
does that replace the old contract or wrap the value in another contract?
another contract
I get the impression that there’s no way to remove a contract from a value?
right
@samth Oh, I’m sorry, I didn’t realize it was your dissertation!
I started reading it yesterday and I did want to say that it is very well written. I’m only on chapter 3 or 4 or so, but I’m really enjoying it so far. I’m looking forward to get to the typing judgments for the occurrence typing.