Power written with .pow(e)
a.pow(e): power is written a ** e
let x = 2
print(x.pow(10))let x = 2
print(x ** 10)Why
CP Lang spells exponentiation with ** on numbers, Mod<P>, Mat<T>, and any type implementing Pow. cpl fix rewrites a.pow(e) to a ** e.
The practice it serves
Spelling that hides what the code means. Family: S.math.
Not flagged
A near miss: close to the pattern, but not it.
let x = 2
print(x ** 10)Turn it off
For one block, wrap it in with lint(pow_method: allow):. For a project, add pow_method = "allow" under [lints] in cp.toml.
Generated from spec/lints/pow_method, the same record the linter is built from.