Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mr_00ff00
6 months ago
|
parent
|
context
|
favorite
| on:
A comparison of Ada and Rust, using solutions to t...
How does this work for dynamic casting? Say like if an age was submitted from a form?
I assume it’s a runtime error or does the compiler force you to handle this?
ajdude
6 months ago
[–]
If you're using SPARK, it'll catch at compile time if there's ever a possibility that it would fit within that condition. Otherwise it'll throw an exception (constraint_error) during runtime for you to catch.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
I assume it’s a runtime error or does the compiler force you to handle this?