About a Utilities module

A Utilities module, i.e. a collection of unrelated functions, is often given as an example of non-cohesiveness, but that’s wrong.

There is no reason to look for cohesiveness into a Utilities module as well as there is no reason to look for cohesiveness into a language syntax.

How cohesive are branching (e.g. if) and looping (e.g. for)?

How cohesive are debouncing (e.g. _.debounce) and grouping (e.g. _.groupBy)?

The question itself doesn’t make sense. But it’s easy to see that both a language syntax and a Utilities module provide (generic) programming constructs.

Utilities are language extensions.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.