3 deleted 7 characters in body
source | link

Short answer: No

Longer answer: Yes, but via the public 'API' of your class

The whole idea of private members of a class is that they represent functionality that should be invisible outside the 'unit' of code, however big you want to define that unit to be. In object oriented code that unit often ends up being a class.

You should have your class designed such that it is possible to invoke all the private functionality through various combinations of input state. If you find there isnt a relatively straight forward way to do this, its probably hint that your design needs closer attention.

EDIT

 

After clarification of the question, this is just a matter of semantics. If the code in question can operate as a separate standalone unit, and is being tested as if it were public code, i cant see any benefit of not moving it into a standalone module. At present, it only serves to confuse future developers (including yourself, in 6 months time), as to why the apparently public code is hidden inside another module.

Short answer: No

Longer answer: Yes, but via the public 'API' of your class

The whole idea of private members of a class is that they represent functionality that should be invisible outside the 'unit' of code, however big you want to define that unit to be. In object oriented code that unit often ends up being a class.

You should have your class designed such that it is possible to invoke all the private functionality through various combinations of input state. If you find there isnt a relatively straight forward way to do this, its probably hint that your design needs closer attention.

EDIT

After clarification of the question, this is just a matter of semantics. If the code in question can operate as a separate standalone unit, and is being tested as if it were public code, i cant see any benefit of not moving it into a standalone module. At present, it only serves to confuse future developers (including yourself, in 6 months time), as to why the apparently public code is hidden inside another module.

Short answer: No

Longer answer: Yes, but via the public 'API' of your class

The whole idea of private members of a class is that they represent functionality that should be invisible outside the 'unit' of code, however big you want to define that unit to be. In object oriented code that unit often ends up being a class.

You should have your class designed such that it is possible to invoke all the private functionality through various combinations of input state. If you find there isnt a relatively straight forward way to do this, its probably hint that your design needs closer attention.

 

After clarification of the question, this is just a matter of semantics. If the code in question can operate as a separate standalone unit, and is being tested as if it were public code, i cant see any benefit of not moving it into a standalone module. At present, it only serves to confuse future developers (including yourself, in 6 months time), as to why the apparently public code is hidden inside another module.

2 added 438 characters in body
source | link

Short answer: No

Longer answer: Yes, but via the public 'API' of your class

The whole idea of private members of a class is that they represent functionality that should be invisible outside the 'unit' of code, however big you want to define that unit to be. In object oriented code that unit often ends up being a class.

You should have your class designed such that it is possible to invoke all the private functionality through various combinations of input state. If you find there isnt a relatively straight forward way to do this, its probably hint that your design needs closer attention.

EDIT

After clarification of the question, this is just a matter of semantics. If the code in question can operate as a separate standalone unit, and is being tested as if it were public code, i cant see any benefit of not moving it into a standalone module. At present, it only serves to confuse future developers (including yourself, in 6 months time), as to why the apparently public code is hidden inside another module.

Short answer: No

Longer answer: Yes, but via the public 'API' of your class

The whole idea of private members of a class is that they represent functionality that should be invisible outside the 'unit' of code, however big you want to define that unit to be. In object oriented code that unit often ends up being a class.

You should have your class designed such that it is possible to invoke all the private functionality through various combinations of input state. If you find there isnt a relatively straight forward way to do this, its probably hint that your design needs closer attention.

Short answer: No

Longer answer: Yes, but via the public 'API' of your class

The whole idea of private members of a class is that they represent functionality that should be invisible outside the 'unit' of code, however big you want to define that unit to be. In object oriented code that unit often ends up being a class.

You should have your class designed such that it is possible to invoke all the private functionality through various combinations of input state. If you find there isnt a relatively straight forward way to do this, its probably hint that your design needs closer attention.

EDIT

After clarification of the question, this is just a matter of semantics. If the code in question can operate as a separate standalone unit, and is being tested as if it were public code, i cant see any benefit of not moving it into a standalone module. At present, it only serves to confuse future developers (including yourself, in 6 months time), as to why the apparently public code is hidden inside another module.

1
source | link

Short answer: No

Longer answer: Yes, but via the public 'API' of your class

The whole idea of private members of a class is that they represent functionality that should be invisible outside the 'unit' of code, however big you want to define that unit to be. In object oriented code that unit often ends up being a class.

You should have your class designed such that it is possible to invoke all the private functionality through various combinations of input state. If you find there isnt a relatively straight forward way to do this, its probably hint that your design needs closer attention.