Scope modules DIP rough messy draft.

12345swordy alexanderheistermann at gmail.com
Sat Oct 27 13:35:05 UTC 2018


On Saturday, 27 October 2018 at 04:54:30 UTC, Neia Neutuladh 
wrote:

> Why do one-time scripts need extra tools to help 
> maintainability? A one- time script is not maintained by 
> definition.
I have wrote scripts before with encapsulation in mind, because 
it consider to be good programming practice. Even that script is 
onetime use. It good to reuse code from old code such as scripts 
for example.

> Is it that great a hardship to include multiple files when it's 
> getting hard to maintain your project as a single file?

Ease of use comes to play here. If I had to create every file 
every time to ensure encapsulation in other languages I would go 
mad.

>
> If you wish to port a project from C++ to D, you should expect 
> to have to refactor it after if you want a maintainable 
> codebase. That's not surprising in the slightest.

You shouldn't have to refactor during porting process in order to 
ensure encapsulation. This feature minimize the refactoring.

>>> If it is a simple small program, then why require private at 
>>> all?
>> That the design that the programmer decides on.
>
> So the motivation for choosing this sort of design is...because 
> you chose this sort of design?
I can't explain every design decision that you find it 
questionable. That is not the goal of the DIP here. You just have 
to trust the programmer judgement.




More information about the Digitalmars-d mailing list