Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
maccard
30 days ago
|
parent
|
context
|
favorite
| on:
Odin: Moving Towards a New "core:OS"
> I guess if one is always able to construct default values of T then this is not a problem.
this is how go handles it;
func do_thing(val string) (string, error)
is expected to return `"", errors.New("invalid state")` which... sucks for performance and for actually coding.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
this is how go handles it;
is expected to return `"", errors.New("invalid state")` which... sucks for performance and for actually coding.