Open inoas opened 5 months ago
What problem does this solve?
It removes divison by zero annomalies during runtime and keeps / and % to work where it is safe by default?
Division is safe by default. It would not be in the language if it was not.
This doesn't make much sense to me at all. There are many times when the divisor can not be a literal. Even if the divisor does turn out to be 0 Gleam makes it very clear what the expected behavior is.
This doesn't make much sense to me at all. There are many times when the divisor can not be a literal. Even if the divisor does turn out to be 0 Gleam makes it very clear what the expected behavior is.
then just use divide/modulo/remainder functions?
This doesn't make much sense to me at all. There are many times when the divisor can not be a literal. Even if the divisor does turn out to be 0 Gleam makes it very clear what the expected behavior is.
then just use divide/modulo/remainder functions?
...that's what the operators are for though—the functions should only be used in places where the divisor cannot be 0 for any reason. Probably 99% of the time it doesn't matter whether the divisor is 0.
What the rule should do:
What problems does it solve:
Example of things the rule would not report:
I am looking for: