Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
msl
on Nov 1, 2019
|
parent
|
context
|
favorite
| on:
Typestates in Rust (2018)
> Why not simply add an `is_closed` flag and throw an error if it is?
That's a way of doing it at runtime. The article describes catching the error at compile time.
amedvednikov
on Nov 1, 2019
[–]
I see, thanks.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
That's a way of doing it at runtime. The article describes catching the error at compile time.