User avatar
amy neobot_flag_finsexualneobot_flag_trans @thing@thegayagenda.fans
2mo
rusteceans, i have a question
why is
.unwrap()-ing an Err value like. the most common panic reason ever?
:pride_heart@gaysex.cloud:1
4
1
0
1
User avatar
sodiboo pride_heart @sodiboo@gaysex.cloud
2mo
@thing because it's easy and error handling is annoying.

at least, we can grep for
.unwrap() to fix all the places we're lazy. unlike some other languages where you need to Study it to find out where exceptions occur and are unhandled.

not that we ever do grep for
.unwrap(). but y'know. we can.
2
0
0
0
User avatar
celeste_hearts_lesbianceleste_hearts_transceleste_hearts_demisexual flori_ava_star:~cursor_blinking @star@amazonawaws.com
2mo
@sodiboo @thing I just forbid unwrap everywhere, and expect is only allowed in tests neocat__w_ it makes your code a lot better
:neobot_heart_cyan@thegayagenda.fans:1
1
0
2
1
User avatar
celeste_hearts_lesbianceleste_hearts_transceleste_hearts_demisexual flori_ava_star:~cursor_blinking @star@amazonawaws.com
2mo
@sodiboo @thing This is not to toot my own horn /gen but practices like these are the reason for why you can just code something up in 2 days and deploy it on a webserver, have it running for 2 months straight, used by thousands of people, and never get a single crash or stuff like that. I remember when python was my primary choice of language (horrible) and my code wouldn't go 4 seconds without exploding at some unforseen thing
:neobot_heart_cyan@thegayagenda.fans:1
0
0
3
1