3 ms·
> you need the call to free So how does ATS enforce memory safety? With Rust you have a bunch of library types that you can reuse that abstract away from the m
by bjz_ 13y ago
> you need the call to free
So how does ATS enforce memory safety? With Rust you have a bunch of library types that you can reuse that abstract away from the memory management for you. The types make sure you don't screw up. Unfortunately you can't prove things about the `unsafe` blocks, and have to rely on careful auditing, but that only needs to be done once, and then you have a nice, reusable abstraction. Bookkeeping sucks.
> What I really want is the next generation of dependently typed system languages which has learnt from the current ones.
Agreed. At the moment Rust suits me the best, but I definitely don't think it is the end of the road.
- doublec 13y ago> So how does ATS enforce memory safety? Linear types. Much like unique pointers in Rust, the type system tells you when you fail to consume a linear type. A 'free' call would do this. Same with closing files, etc - you use linear types to track that the resource is consumed.
- bjz_ 13y agoAh neat. Does it have regions?