Update len-metamethod-rawlen.md

This commit is contained in:
Arseny Kapoulkine 2022-06-13 11:32:44 -07:00 committed by GitHub
parent c45bb8b4cf
commit 3a6c3ea93a
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,8 @@ and even when it is, using the existing metamethod-absence-caching approach we u
statistically significant difference on existing benchmark suite. This does complicate the `#` computation a little more which may affect JIT as well, but even if the
table doesn't have a metatable the process of computing `#` involves a series of condition checks and as such will likely require slow paths anyway.
This is technically changing semantics of `#` when called on tables with an existing `__len` metamethod, and as such has a potential to change behavior of an existing valid program. That said, it's unlikely that any table would have a metatable with `__len` metamethod as outside of userdata these do not do anything.
This is technically changing semantics of `#` when called on tables with an existing `__len` metamethod, and as such has a potential to change behavior of an existing valid program.
That said, it's unlikely that any table would have a metatable with `__len` metamethod as outside of userdata it would not anything, and this drawback is not feasible to resolve with any alternate version of the proposal.
## Alternatives