-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[stdlib] Rename List.size
to List._len
and refactor usage of the field to use the public API
#3814
base: main
Are you sure you want to change the base?
Conversation
I'll leave this as draft until a decision is made of whether to deprecate accessing the fields directly. Since this implementation will have issues when trying to access the field with an immediate operation e.g. |
Let's do that and remove the setters/getters. Can you please also add a changelog entry so people understand their compiler errors as a result of this change if they are accessing the length field directly of |
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
6e070d8
to
2c7857d
Compare
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
List.size
to List._len
adding getattr
and setattr
for size
List.size
to List._len
and refactor usage of the field to use the public API
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
…pan[Scalar[D]]` (#52584) [External] [stdlib] Add `List[Scalar[D]].extend()` from `SIMD` and `Span[Scalar[D]]` Add `List[Scalar[D]].extend()` from `SIMD` and `Span[Scalar[D]]` Split off from #3814. This is needed to enable efficient appending of scalar value sequences to a `List` without having to resort to `UnsafePointer` manually. ORIGINAL_AUTHOR=martinvuyk <[email protected]> PUBLIC_PR_LINK=#3854 Co-authored-by: martinvuyk <[email protected]> Co-authored-by: Connor Gray <[email protected]> Closes #3854 MODULAR_ORIG_COMMIT_REV_ID: 7d0c724497ba0671ae660f4de5758d6c4baad7bc
…pan[Scalar[D]]` (#52584) [External] [stdlib] Add `List[Scalar[D]].extend()` from `SIMD` and `Span[Scalar[D]]` Add `List[Scalar[D]].extend()` from `SIMD` and `Span[Scalar[D]]` Split off from modular#3814. This is needed to enable efficient appending of scalar value sequences to a `List` without having to resort to `UnsafePointer` manually. ORIGINAL_AUTHOR=martinvuyk <[email protected]> PUBLIC_PR_LINK=modular#3854 Co-authored-by: martinvuyk <[email protected]> Co-authored-by: Connor Gray <[email protected]> Closes modular#3854 MODULAR_ORIG_COMMIT_REV_ID: 7d0c724497ba0671ae660f4de5758d6c4baad7bc
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Not sure what the status of this PR is, but left a suggestion for the changelog entry just in case. |
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Hi @arthurevans thanks for the input, you're totally right that this needed some examples :) |
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Signed-off-by: martinvuyk <[email protected]>
Rename
List.size
toList._len
and refactor usage of the field to use the public API.Details:
List
.