Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lock1
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
91.
▲
by
lock1
1y ago
What if almost everything is NULLABLE? including the supposedly primary key and foreign keys of the table? I've had the firsthand experience building a consumer for that kind of DB and it's hell to get anything running correctly w
92.
▲
by
lock1
1y ago
Assuming you're referring to a "smart computer opponent", it's probably a mix of many factors. Indie gamedevs usually won't have the resources to implement cutting-edge technology; they just go with whatever standar
93.
▲
by
lock1
1y ago
That's what I thought at first too. At first glance they look equivalent, telling API users what the expected result of a method call is. In that sense, both are equivalent. But after experimenting a bit with checked exceptions, I real
94.
▲
by
lock1
1y ago
If only Java also provided Either<L,R>-like in the standard library... Personally I use checked exceptions whenever I can't use Either<> and avoid unchecked like a plague. Yeah, it's pretty sad Java language designer j
95.
▲
by
lock1
1y ago
I find regular OOP language constructor are too restrictive. You can't return something like Result<CorrectObject,ConstructorError> to handle the error gracefully or return a specific subtype; you need a static factory method to
96.
▲
by
lock1
1y ago
Maybe "Making illegal state unrepresentable" is the term you're looking for? https://fsharpforfunandprofit.com/posts/designing-with-types... https://inside.java/2024/06/03/
97.
▲
by
lock1
1y ago
Unfortunately you can't escape stringly-typed (and other mess) in language with structural type system.