Re: struct parameterless constructor

2025-08-05 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Aug 05, 2025 at 03:27:06AM -0600, Jonathan M Davis via Digitalmars-d-learn wrote: > On Monday, August 4, 2025 5:21:53 PM Mountain Daylight Time H. S. Teoh via > Digitalmars-d-learn wrote: > > Fast forward 20 or so years, and things have changed a bit. People > > started using structs for

Re: struct parameterless constructor

2025-08-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, August 4, 2025 2:02:48 PM Mountain Daylight Time Brother Bill via Digitalmars-d-learn wrote: > I feel like I am going into the hornet's nest with this > discussion. > > I have created a struct with some members, and want to have a > parameterless constructor that sets the member values

Re: struct parameterless constructor

2025-08-05 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, August 4, 2025 5:21:53 PM Mountain Daylight Time H. S. Teoh via Digitalmars-d-learn wrote: > Fast forward 20 or so years, and things have changed a bit. People > started using structs for many other things, some beyond the original > design, and inevitably ran into cases where they rea

Re: struct parameterless constructor

2025-08-04 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Aug 04, 2025 at 08:02:48PM +, Brother Bill via Digitalmars-d-learn wrote: > I feel like I am going into the hornet's nest with this discussion. You are. ;-) > I have created a struct with some members, and want to have a > parameterless constructor that sets the member values at run

Re: struct parameterless constructor

2025-08-04 Thread Alex Bryan via Digitalmars-d-learn
On Monday, 4 August 2025 at 20:02:48 UTC, Brother Bill wrote: I feel like I am going into the hornet's nest with this discussion. I have created a struct with some members, and want to have a parameterless constructor that sets the member values at run time. I have seen things like @disable

Re: struct parameterless constructor

2025-08-04 Thread monkyyy via Digitalmars-d-learn
On Monday, 4 August 2025 at 20:02:48 UTC, Brother Bill wrote: I feel like I am going into the hornet's nest with this discussion. I have created a struct with some members, and want to have a parameterless constructor that sets the member values at run time. I know of no sane way to do that

struct parameterless constructor

2025-08-04 Thread Brother Bill via Digitalmars-d-learn
I feel like I am going into the hornet's nest with this discussion. I have created a struct with some members, and want to have a parameterless constructor that sets the member values at run time. I have seen things like @disable this(); and static opCall(), but don't quite understand them.