Implementing typestate
Ola Fosheim Grøstad via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 15 13:14:09 PDT 2015
On Tuesday, 15 September 2015 at 20:01:16 UTC, Meta wrote:
> On Tuesday, 15 September 2015 at 18:30:34 UTC, Ola Fosheim
> Grøstad wrote:
>> It is the same type of concept. Typestate, effect system,
>> linear typing, behavioural typing. It is no doubt the future
>> for type systems, but also demanding. I've tried to raise
>> awareness about it before, but no takers:
>>
>> http://forum.dlang.org/post/ovoarcbexpvrrceysnrs@forum.dlang.org
>
> If I remember correctly Rust *did* have a typestate system very
> early on but it was done away with in favour of the borrow
> checker.
Yeah, I've seen the Rust creator write about how they started out
with all whistles and bells with the intent of having a full blow
effect system. Then realized that they had to make things simpler
and focus on memory management because that was the most critical
feature. Probably a wise strategy to go for simplicity and hit
version 1.0 sooner.
Having a simple core language is usually a good idea. I see now
in the rust forums that people use the borrow checker for other
things than memory, like tracking what thread you are in:
https://users.rust-lang.org/t/my-gamedever-wishlist-for-rust/2859/7
More information about the Digitalmars-d
mailing list