zlacker

[return to "Legalizing sports gambling was a mistake"]
1. rty32+0p2[view] [source] 2024-09-27 10:46:59
>>jimbob+(OP)
Silly take: humans are really bad at controlling themselves and stick to doing the correct things, that's why newer languages like Go and Rust force you to check errors in return values, among many other additional checks/guardrails that didn't exist or weren't common in older languages. It is just easier to have the compiler checks these things for you instead of manually making sure things are correct. Same for sports gambling. Human nature is really bad, and it is really hard to control yourself. See that wsj reporting. Even someone as rich and educated as a psychiatrist can sink 6 digit amount of money into gambling. When the law allowed gambling, especially online gambling, it opened a can of worms.
◧◩
2. jjice+nN2[view] [source] 2024-09-27 13:29:14
>>rty32+0p2
Sorry for the nitpick but I'm curious if I'm off here:

> that's why newer languages like Go and Rust force you to check errors in return values

Go doesn't require you check return values though, no? I can get a return of type (*Model, error) and just completely ignore the error portion of it and never check it. Rust doesn't let you access the value until you deal with the Result/Option wrapper, requiring that you at least acknowledge the potential for an error.

◧◩◪
3. tredre+gI4[view] [source] 2024-09-28 03:14:52
>>jjice+nN2
You can ignore it but the compiler will force you to assign it to something, usually `_`. That alone is helpful in reminding the programmer that return values need to thought of, but in addition you have pretty much all Go linters/analyzers force you to check its value and not use `_`.
[go to top]