Move File To A Matching Type Refactoring

When everything is top-level do you not need namespaces because everything is "top-level"? Thanks for helping my understanding.
13 Replies
Angius
Angius3y ago
Basically, yes You can, technically, just... not declare namespaces
BigggMoustache
BigggMoustacheOP3y ago
Oh alright. I was super confused everything worked from different files for a moment
Angius
Angius3y ago
Which would mean no need for using
BigggMoustache
BigggMoustacheOP3y ago
yeah. One more quick question on the topic
BigggMoustache
BigggMoustacheOP3y ago
I have a bunch of different types from an exercise and not sure how to group them.
Angius
Angius3y ago
By their purpose or type
BigggMoustache
BigggMoustacheOP3y ago
for example 'Amarok' inherits from an abstract base but also uses an interface.
Angius
Angius3y ago
For example, Monster and Player could both go to /Characters All the senses to /Senses Or you could go the feature route, and use /Maelstrom where you store it and its sense And have an /Infrastructure or a similar directory for the interfaces
BigggMoustache
BigggMoustacheOP3y ago
so it's really a however yo uwanna do it thing
Angius
Angius3y ago
Yep
BigggMoustache
BigggMoustacheOP3y ago
is this like 'design pattern' type question? I've still not learned about that it's on the list of things to do xD.
Angius
Angius3y ago
Kinda, yeah Domain-driven design, layered architecture, etc
BigggMoustache
BigggMoustacheOP3y ago
alrighty. Thanks for the information. :]
Want results from more Discord servers?
Add your server