Skip to content

Add support for the (logical) combination of specifications #254

Description

@AndreErb

I wonder if it would be possible to add support for the (logical) combination of specifications, using operators like (&, |, !, ==, !=)

I have watched your guys' YouTube videos about this Specification Library and you too mentioned the problem, that specification names tend to become large, when multiple logic/rules are contained. You discussed different naming approaches to mitigate this, however it feels like the real problem is somehow a consequence of the pattern itself. If one has "SpecA" and "SpecB" it seems to violate the DRY principle as well, if one had to create "SpecAB" with both rules repeated, just in order to combine them.

This seems to be related to Add support for updating specifications
Also ASbeletsky's NSpecification library has this kind feature and I saw this approach on different web blogs, too.

Not sure if it is possible (diserable) at all, since specs also project the result and therefore might not even be compatible at all.
However, it seems hard to extend this for ourselves and if it could or should be done, it feels like should be done in the library itself.

BTW: Thanks for this library and your great work!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions