mleku on Nostr: most programming languages don't follow the principle of fail fast tho go is the only ...
most programming languages don't follow the principle of fail fast tho
go is the only language i know of where you are admonished vigorously to handle errors before you handle success, it's for this reason almost all apis of go have a separate error variable in the return, and there is such a thing as a success with error so the common model in OOP languages of having errors be a variant doesn't allow you to catch errors while otherwise the call succeeded, there is such a thing as nonfatal errors
Published at
2025-05-24 04:50:58Event JSON
{
"id": "ce943ea30434252fbee7496f6ed42a9dad88b71b630c32ffc63255273330af93",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1748062258,
"kind": 1,
"tags": [
[
"e",
"6d8251eacddb5c32e0585f5dbf595e211407536ea222ad44c350317a8c34e88e",
"wss://theforest.nostr1.com/",
"root"
],
[
"e",
"576f2cc43c0f69e838040dc5f0d4025a8ccc49d8602f350dccc4975182030c78",
"wss://theforest.nostr1.com/",
"reply"
],
[
"p",
"fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1",
"",
"mention"
],
[
"client",
"noStrudel",
"31990:266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5:1686066542546"
]
],
"content": "most programming languages don't follow the principle of fail fast tho\n\ngo is the only language i know of where you are admonished vigorously to handle errors before you handle success, it's for this reason almost all apis of go have a separate error variable in the return, and there is such a thing as a success with error so the common model in OOP languages of having errors be a variant doesn't allow you to catch errors while otherwise the call succeeded, there is such a thing as nonfatal errors",
"sig": "ba58f00c62a07e6643ab2679f72c5bdf56d56ae2a61c5a8ba41b039443b5132cbfed0310336f09f1cb6d228f578dad4761db5298f49dc30ff4322d3b2a57a3e3"
}