4 ms·
> It has no booleans [...] either succeeds and produces [...] result[s] or it fails. That's a very interesting concept. I immediately thought, what if the ques
by karmakaze 7y ago
> It has no booleans [...] either succeeds and produces [...] result[s] or it fails.
That's a very interesting concept. I immediately thought, what if the question was whether a certain condition exists in the data or not. The answer would be any single instance found in the data.
This jives with how I always question putting booleans in database schemas. It's usually better to add a piece of data that the boolean represents like a date for when a predicate changed or an enum for the 'flavor' of true. Passing a false/true to a function gives no info unless the function name makes it clear.
=> booleans are a (premature) optimization.