Re: Variables of struct and class types are called objects - discuss

2025-08-03 Thread monkyyy via Digitalmars-d-learn
On Monday, 4 August 2025 at 02:03:35 UTC, Jonathan M Davis wrote: I don't think that I've ever seen anyone claiming before that a an instance of a struct should not be considered an object. Calling a plain old data like a vec2 an "object" is projecting and shouldnt be done. --- The terminol

Re: Variables of struct and class types are called objects - discuss

2025-08-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, August 3, 2025 9:31:34 AM Mountain Daylight Time Paul Backus via Digitalmars-d-learn wrote: > I have never seen any D programmer use "object" to mean "struct > or class instance." That is always how I use the term. I see no reason to differentiate between what an instance of a struct i

Re: Variables of struct and class types are called objects - discuss

2025-08-03 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 3 August 2025 at 15:31:34 UTC, Paul Backus wrote: The second one comes from C, where "object" refers to any value stored in memory. This kind of "object" is defined in the ["Object Model" section][2] of the language specification, and is mostly of interest to those writing low-lev

Re: Variables of struct and class types are called objects - discuss

2025-08-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, August 3, 2025 5:29:46 AM Mountain Daylight Time Mike Parker via Digitalmars-d-learn wrote: > Classes and structs in C++ are both value types, and instances of > both are referred to as objects. This isn't unusual. > > An object is a concrete instance of a type described by a class > or

Re: Variables of struct and class types are called objects - discuss

2025-08-03 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 3 August 2025 at 11:11:43 UTC, Brother Bill wrote: In Programming in D book, page 247, it is written: Variables of struct and class types are called objects. This struck me as odd and confusing. I have always been taught that objects are instances of classes. That is, new MyClass

Re: Variables of struct and class types are called objects - discuss

2025-08-03 Thread monkyyy via Digitalmars-d-learn
On Sunday, 3 August 2025 at 11:11:43 UTC, Brother Bill wrote: Please assist with my "deprogramming" from "objects" being only for reference types. the words mean nothing, it was all compounding mistakes that then people exploited to sell books https://www.amazon.com/Object-Oriented-Programmi

Re: Variables of struct and class types are called objects - discuss

2025-08-03 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 3 August 2025 at 11:11:43 UTC, Brother Bill wrote: In Programming in D book, page 247, it is written: Variables of struct and class types are called objects. This struck me as odd and confusing. I have always been taught that objects are instances of classes. That is, new MyClass

Re: Variables of struct and class types are called objects - discuss

2025-08-03 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 03/08/2025 11:11 PM, Brother Bill wrote: Am curious whether experienced D developers actually refer to both struct and class variables as "objects" without confusion. Strictly speaking the definition from the C standard: "region of data storage in the execution environment, the contents of

Variables of struct and class types are called objects - discuss

2025-08-03 Thread Brother Bill via Digitalmars-d-learn
In Programming in D book, page 247, it is written: Variables of struct and class types are called objects. This struck me as odd and confusing. I have always been taught that objects are instances of classes. That is, new MyClass creates an instance or object of MyClass. There was a wall