Re: Best practices for class instance variables as parameters

2024-09-28 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Sep 28, 2024 at 06:16:55PM +, Ian via Digitalmars-d-learn wrote: > Hi, > > I'm coming from C and some C++ so the way D stores class instance > variables is new to me. If I'm not mistaken the basic unadorned > instance variable is like a "hidden" pointer. So, when passing class > instan

Re: Best practices for class instance variables as parameters

2024-09-28 Thread Andy Valencia via Digitalmars-d-learn
On Saturday, 28 September 2024 at 18:16:55 UTC, Ian wrote: Hi, I'm coming from C and some C++ so the way D stores class instance variables is new to me. If I'm not mistaken the basic unadorned instance variable is like a "hidden" pointer. So, when passing class instance variables to a functio

Best practices for class instance variables as parameters

2024-09-28 Thread Ian via Digitalmars-d-learn
Hi, I'm coming from C and some C++ so the way D stores class instance variables is new to me. If I'm not mistaken the basic unadorned instance variable is like a "hidden" pointer. So, when passing class instance variables to a function, what would be the point of passing a pointer or ref? I