Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
xerokimo
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
xerokimo
7mo ago
> Hiding heap allocations seems like it make it harder to avoid resource leaks! Because types come in constructor / destructor pairs. When creating variables, you're forced to invoke a constructor, and when an the object's
2.
▲
by
xerokimo
10mo ago
RAISI is always wrong because the whole advantage of the try block is to write a unit of code as if it can't fail so that what said unit is intended to do if no errors occur is very local. If you really want to handle an error coming f
3.
▲
by
xerokimo
2y ago
An error to me can be as simple as any time I need to write a range check so I don't index out of bounds, that very act of range checking is an error check. In other words, any time you require a runtime check to prevent an operation t
4.
▲
by
xerokimo
2y ago
That's being idiomatic to a language, not being semantically correct. Result, Either, Expected, all have different names, but their semantics are all the same. Panic and Recover may not be idiomatically used the same way Exceptions are