On Friday, June 27, 2025 10:31:42 AM Mountain Daylight Time Quirin Schroll via
Digitalmars-d-learn wrote:
> On Tuesday, 24 June 2025 at 02:05:40 UTC, Jonathan M Davis wrote:
> > There's also the issue of templated code. If an attribute is
> > desirable in the cases where it works, and it's fine fo
On Friday, June 27, 2025 1:55:30 PM Mountain Daylight Time WraithGlade via
Digitalmars-d-learn wrote:
> Thanks for responding to my question and for your time, etc.
>
> I was aware of `align` but as far as I am aware it is orthogonal
> to what I'm asking about. The Andrei book says that D
> automa
On Friday, 27 June 2025 at 22:33:25 UTC, Andy Valencia wrote:
tupleof works for struct and class instances, but explicitly
documents that it ignores instance variables from any
superclass.
Is there any way to enumerate _all_ the instance variables, not
just the ones present in the specific in
tupleof works for struct and class instances, but explicitly
documents that it ignores instance variables from any superclass.
Is there any way to enumerate _all_ the instance variables, not
just the ones present in the specific instance's class?
Thanks,
Andy
On Friday, 27 June 2025 at 19:55:30 UTC, WraithGlade wrote:
orthogonal to what I'm asking about. The Andrei book says that
D automatically rearranges members of `class`s in memory to
avoid wasting memory due to padding between members whose width
is less than the native CPU word size alignment,
On Friday, 27 June 2025 at 19:55:30 UTC, WraithGlade wrote:
Thanks for responding to my question and for your time, etc.
I was aware of `align` but as far as I am aware it is
orthogonal to what I'm asking about. The Andrei book says that
D automatically rearranges members of `class`s in memory
Thanks for responding to my question and for your time, etc.
I was aware of `align` but as far as I am aware it is orthogonal
to what I'm asking about. The Andrei book says that D
automatically rearranges members of `class`s in memory to avoid
wasting memory due to padding between members whos
On Tuesday, 24 June 2025 at 02:05:40 UTC, Jonathan M Davis wrote:
There's also the issue of templated code. If an attribute is
desirable in the cases where it works, and it's fine for it to
be ignored in the cases where it doesn't apply, then that means
that you can have code such as
```d
scop
On Friday, 27 June 2025 at 11:23:56 UTC, WraithGlade wrote:
I've read both of the available printed D books in their
entirety (Ali's and Andrei's) and I noticed Andrei's book
(circa ~2010) mentions that the D compiler rearranges the
members of `class` objects to be more optimal by reducing
ali
I've read both of the available printed D books in their entirety
(Ali's and Andrei's) and I noticed Andrei's book (circa ~2010)
mentions that the D compiler rearranges the members of `class`
objects to be more optimal by reducing alignment-induced padding
whereas it leaves the alignment-induce
Oh, and here's another minor update. I've added another `public
import` line to the module to ensure it actually works correctly
when imported:
```D
public import std.stdio;
```
Previously I had carelessly omitted this because I was using
`trace.d` only in contexts where `std.stdio` had alrea
11 matches
Mail list logo