Remix.run Logo
tialaramex 2 days ago

One reason people think success == true is a good idea is they are (as in C) working with truthiness.

In C "false" is truthy, and so is "" but 0 is falsy

In a language where types aren't a gentle suggestion "false" is a string, so it can't be true or false, which are booleans. In such a language if (success) implies that success is a boolean, so the comparison is redundant. But C is not that language.