inconsistent naming: `Array::length` and `Array::rev`
The current API design of the Array type is inconsistent in its method naming conventions. It provides both a length and a rev method. For better consistency and clarity, the naming should be standardized to use either:
-
lenandrev- following a shorter, more succinct naming convention. -
lengthandreverse- using more descriptive, complete names.
As well as Map.size(), which is neither len nor length
@qazxcdswe123 shall we all call it len and deprecate the old API?
I second len, but I think as long as the naming is consistent, it wouldn't matter too much.
@qazxcdswe123 shall we all call it
lenand deprecate the old API?
According to grep, most of the current API use length so maybe just stick with length?
And we also have lots of size
also need to consider rev_each, rev_eachi etc.
Update: we now decide to
- unify to
len(forlengthandsize), aligning with Rust, and - keep
lengthfor the time being and deprecatesizeassizehas fewer occurences (only formapandset). We will provide migration tool forlengthin the future