[rust-dev] I would like to remove typestate.
pwalton at mozilla.com
Fri Jul 13 09:20:23 PDT 2012
On 07/13/2012 09:04 AM, Niko Matsakis wrote:
> Hello Rustics,
> Per recent discussions, I would very much like to remove code related to
> typestate. It seems that the current approach is not scaling up to real
> problems. There has been some discussion about alternative,
> lighterweight approaches. I am not opposed to such forward motion.
I agree. I think that a design-by-contract system, which I'm not opposed
to, will not share any code with the existing typestate system, so
having that code around is not buying us anything.
> As I said, there are various ways to repair this situation, but given
> that the code is on life support, I'd rather not expend energy fixing
> it. My plan for removal would be to convert all remaining function
> preconditions into assertions. Last time I discussed this on IRC,
> Graydon objected I think because he was concerned that there were
> checks that were being relied upon but which would not be lost. I am
> not sure if converting existing checks into assertions assuages those
What function preconditions remain? My understanding was that there
weren't any in the Rust compiler and standard libraries...
More information about the Rust-dev