Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bombela
on July 23, 2024
|
parent
|
context
|
favorite
| on:
Types as Interfaces
The salient excerpt is: "A parser is just a function that consumes less-structured input and produces more-structured output". In opposition to a validation function that merely raises an error.
- validate(raw) -> void - parse(raw) -> Email | Error
Of course the type signature is what seals the deal at the end of the day. But I am going to follow this naming convention from now on.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: