Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jarrett
on April 10, 2014
|
parent
|
context
|
favorite
| on:
Programming paradigms that change how you think ab...
Exactly. That's why I proposed a Haskell-ish Maybe construct to represent the uncertainty of the input's validity. The code snippet:
int x (>= 0, <=10) | x = parseInt(getKeyboardInput)
...was meant as an example of what
won't
work.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: