Scope modules DIP rough messy draft.
Jusl
jusl at gmail.usa
Sat Oct 27 20:34:36 UTC 2018
On Saturday, 27 October 2018 at 13:35:05 UTC, 12345swordy wrote:
> 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.
So when you copy and paste, do so by putting it into its own
module. If you are just going to copy and paste it into another
one time script then it doesn't really make a whole lot of sense.
You can still use private and such in your one time script and
when you copy and paste it to a larger file with its own modules
you will have the encapsulation.
Separating code into multiple files with modules is also good
programming practice :). If you are going to day that you can't
really pick and choose the ones that only benefit your argument.
More information about the Digitalmars-d
mailing list