Skip to content

Remove PackedIntArray from std #21676

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

Closed
tgschultz opened this issue Oct 11, 2024 · 0 comments · Fixed by #21682
Closed

Remove PackedIntArray from std #21676

tgschultz opened this issue Oct 11, 2024 · 0 comments · Fixed by #21682
Labels
accepted This proposal is planned. breaking Implementing this issue could cause existing code to no longer compile or have different behavior. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@tgschultz
Copy link
Contributor

As the original author of the packed_int_array module, it is my opinion that it should be removed from std. My reasoning is as follows:

  1. I originally wrote it to prove that we didn't need packed int arrays as a language feature during a time when Zig's semantics were quite a bit different
  2. (read|write)PackedInt* are a smaller, less cumbersome implementation of much of the solution with the rest being trivially implementable from them
  3. Packed structs with @Vectors are also effectively packed int arrays
  4. There are several open issues regarding the module (design flaw: semantics of loading values with undefined bits #19634, std.PackedIntArray fails for some int types at comptime #19627, Assertion failed at /deps/zig/src/stage1/codegen.cpp:7611 in gen_const_val #7648)
  5. Of the uses of the module that I have seen, none cannot be easily replaced with the above alternatives
@andrewrk andrewrk added contributor friendly This issue is limited in scope and/or knowledge of Zig internals. breaking Implementing this issue could cause existing code to no longer compile or have different behavior. standard library This issue involves writing Zig code for the standard library. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. accepted This proposal is planned. labels Oct 11, 2024
@andrewrk andrewrk added this to the 0.14.0 milestone Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This proposal is planned. breaking Implementing this issue could cause existing code to no longer compile or have different behavior. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants