Re: (Noob question) Should subclasses be defined in separate modules?

2023-01-12 Thread Mike Parker via Digitalmars-d-learn
On Friday, 13 January 2023 at 05:17:59 UTC, thebluepandabear wrote: (Sorry if this is a duplicate.) If I have the following code inside of a module: ```D class Obj { private { string name = "Hi"; } } class ObjDerived : Obj { } ``` Is it best practice to define `ObjDerived`

(Noob question) Should subclasses be defined in separate modules?

2023-01-12 Thread thebluepandabear via Digitalmars-d-learn
(Sorry if this is a duplicate.) If I have the following code inside of a module: ```D class Obj { private { string name = "Hi"; } } class ObjDerived : Obj { } ``` Is it best practice to define `ObjDerived` inside another module, since `ObjDerived` can still access the