News for hackers. Stuff that matters.
Re:DRY is an over-rated programming principle? by ParetoOptimal on Thursday July 07, 2022 @11:47AM (#32015544)
The ideal is having 3 functions I think:

- make_string_filename_style1

- make_string_filename_style2

- make_string_filename

Then make_string_filename consists of logic to use the right style.

Or one function and a Sum type to be called like:

    makeStringFilename Style1 "somestring"
Given sum type:

    data FilenameStringStyles = Style1 | Style2

There are no comments on this comment yet.