TheCharlatan on Nostr: Writing RAII style C++ is fine and good, but having no common pattern to effectively ...
Writing RAII style C++ is fine and good, but having no common pattern to effectively handle errors in constructors sucks. You can see it all over Bitcoin Core's codebase. There are like five different ways to handle these errors and none of them are really ergonomic.
Published at
2024-08-31 15:25:57Event JSON
{
"id": "561d0ef15aef38440487627dea09bca7a78a6464e2807c21cae3ced5c845d77a",
"pubkey": "2eb03a1f316c3cf9c900e7f536ee28e5486349067be018a965a7c7ca5b4f7f3c",
"created_at": 1725117957,
"kind": 1,
"tags": [],
"content": "Writing RAII style C++ is fine and good, but having no common pattern to effectively handle errors in constructors sucks. You can see it all over Bitcoin Core's codebase. There are like five different ways to handle these errors and none of them are really ergonomic.",
"sig": "58365a1fa4737b411fcccc7f53ec1b80cb8b704054c339e8418e488ac86c202f3e23ba60fc4131159ec07183709c92909498d22d77904b820b0269951e7f18ce"
}