digitalmars.D - bit fields
- Dom DiSc (14/14) Feb 07 2023 Hello.
- Adam D Ruppe (5/7) Feb 07 2023 It is a preview switch in there (and one that should never be
- Nick Treleaven (3/5) Feb 07 2023 The spec PR was never merged:
- Dom DiSc (2/8) Feb 08 2023 Ok, thanks.
- Dmitry Ponyatov (5/7) Oct 08 2023 Is any chance that a few years later D will adopt packed
- Imperatorn (2/9) Oct 08 2023 Same
- Bruce Carneal (7/19) Oct 08 2023 Do you have issues with the earlier alternative?
- Imperatorn (3/22) Oct 08 2023 Sorry, I meant to reply to "I see D can be intensively used in
Hello. Bit fields were introduced in 101.0, but searching for them yields as first results: "D does not support bit fields. If needed, they can be emulated with shift and mask operations, or use the std.bitmanip.bitfields library type." "Bit fields are supported with the bitfields template." and "ImportC - There are many implementation defined aspects of C11 bit fields. ImportC's behavior adjusts to match the behavior of the associated C compiler on the target platform." But no mention that they are now available. Also the spec doesn't describe them. Have they been removed again with 102.0 ?
Feb 07 2023
On Tuesday, 7 February 2023 at 14:27:16 UTC, Dom DiSc wrote:Bit fields were introduced in 101.0, but searching for them yields as first results:It is a preview switch in there (and one that should never be allowed to remain, it is an absolutely awful and near totally useless design). -preview=bitfields is still in the code right now.
Feb 07 2023
On Tuesday, 7 February 2023 at 14:27:16 UTC, Dom DiSc wrote:But no mention that they are now available. Also the spec doesn't describe them.The spec PR was never merged: https://github.com/dlang/dlang.org/pull/3190
Feb 07 2023
On Tuesday, 7 February 2023 at 16:21:44 UTC, Nick Treleaven wrote:On Tuesday, 7 February 2023 at 14:27:16 UTC, Dom DiSc wrote:Ok, thanks.But no mention that they are now available. Also the spec doesn't describe them.The spec PR was never merged: https://github.com/dlang/dlang.org/pull/3190
Feb 08 2023
The spec PR was never merged: https://github.com/dlang/dlang.org/pull/3190Is any chance that a few years later D will adopt packed union/structured with bit fields, slicing and formatting (Erlang-like maybe) ? I see D can be intensively used in embedded and telecom application, where bit ops is definetely required.
Oct 08 2023
On Sunday, 8 October 2023 at 08:22:20 UTC, Dmitry Ponyatov wrote:SameThe spec PR was never merged: https://github.com/dlang/dlang.org/pull/3190Is any chance that a few years later D will adopt packed union/structured with bit fields, slicing and formatting (Erlang-like maybe) ? I see D can be intensively used in embedded and telecom application, where bit ops is definetely required.
Oct 08 2023
On Sunday, 8 October 2023 at 15:52:34 UTC, Imperatorn wrote:On Sunday, 8 October 2023 at 08:22:20 UTC, Dmitry Ponyatov wrote:Do you have issues with the earlier alternative? https://dlang.org/phobos/std_bitmanip.html#bitfields I use and like this one quite a bit. The new bitfield variant *might* be important for C interop? I'm not in embedded development at the moment but if I went back there I'd prefer the original D bitfields for any new development.SameThe spec PR was never merged: https://github.com/dlang/dlang.org/pull/3190Is any chance that a few years later D will adopt packed union/structured with bit fields, slicing and formatting (Erlang-like maybe) ? I see D can be intensively used in embedded and telecom application, where bit ops is definetely required.
Oct 08 2023
On Sunday, 8 October 2023 at 16:14:15 UTC, Bruce Carneal wrote:On Sunday, 8 October 2023 at 15:52:34 UTC, Imperatorn wrote:Sorry, I meant to reply to "I see D can be intensively used in embedded and telecom application". That's what I wrote "Same" toOn Sunday, 8 October 2023 at 08:22:20 UTC, Dmitry Ponyatov wrote:Do you have issues with the earlier alternative? https://dlang.org/phobos/std_bitmanip.html#bitfields I use and like this one quite a bit. The new bitfield variant *might* be important for C interop? I'm not in embedded development at the moment but if I went back there I'd prefer the original D bitfields for any new development.Same[...]Is any chance that a few years later D will adopt packed union/structured with bit fields, slicing and formatting (Erlang-like maybe) ? I see D can be intensively used in embedded and telecom application, where bit ops is definetely required.
Oct 08 2023