Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
orphea
11 days ago
|
parent
|
context
|
favorite
| on:
Cloudflare outage on November 18, 2025 post mortem
Like goto, unwrap is just a tool that has its use cases. No need to make a boogeyman out of it.
gishh
11 days ago
|
next
[–]
To be fair, if you’re not “this tall” you really shouldn’t consider using goto in a c program. Most people aren’t that tall.
reply
tucnak
11 days ago
|
parent
|
next
[–]
Nonsense. Linux kernel for one example, uses goto everywhere for error handling.
reply
gishh
6 days ago
|
root
|
parent
|
next
[–]
How many codebases besides the Linux kernel had you seen an intentional amount of use of goto?
reply
orphea
4 days ago
|
root
|
parent
|
next
[–]
The answer is one search away on GitHub.
I will give you one example though: various .NET repositories (runtime, aspnetcore, orleans).
reply
metaltyphoon
11 days ago
|
prev
|
next
[–]
Yes it's meant to be used in test code. If you're sure it can't fail do then use .expect() that way it shows you made a choice and it wasn't just a dev oversight.
reply
fwjafwasd
11 days ago
|
prev
[–]
panicans should be using .expect() in production
reply
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: