Posted on nix-devel: https://groups.google.com/d/msgid/nix-devel/CAP6MKsviQpvhRLUxr_%3Dp%3DYk4KF%3DOZKydAZNzx0AOOXYLr7jhSQ%40mail.gmail.com
builtins for modulo + power could also emulated binary operator.
Another vote for “don’t add special operators for this”. These kind of operations are, realistically, an edge case - and operators are extremely expensive to add to a language; there’s a limited space of symbols that can be used for operators, and operators are practically impossible to ever deprecate.
Built-in functions could indeed be a solution here, and a bitfield type may also be interesting if it can be sufficiently motivated to have common usecases.
1 Like