i have 5 classes, 4 of them i will only use inside the tictactoe class.
in your opinion, is it better to implement these classes inside the tictactoe class, or implement each class on its own ?
i mean is there a performance issue for example with one approach of these two, or it's just personal preferences
There no significant (if at all) performance overheard from making a class nested. If you don't want to expose implementation details you should consider nested classes. Code readability is also one more reason you shouldn't use nested classes. It makes things unnecesarily difficult and complex
You should try to make things simple, simple things usually are easy to fix/refactor.
Обсуждают сегодня