# solodon4/Mach7

Functional programming style pattern-matching library for C++

Repository: https://github.com/solodon4/Mach7
Canonical: https://ross.abutalabs.com/products/mach7
Language: C++
License: NOASSERTION
License Family: other
Topics: pattern-matching, pattern, variant, visitor, visitor-pattern, algebraic-data-types, adt
Last push: 2021-10-22T23:24:16+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4482, "days_push": 1776, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1319, forks 76 (observed 2026-08-28T04:04:21.669667+00:00)

## What it is
Mach7 is a C++ library providing functional-programming-style pattern matching, supporting user-definable patterns, algebraic data types, and matching on open class hierarchies. It is implemented as a header-only library that brings ML/Haskell-like match expressions to C++ without language changes.

## Use cases
- pattern matching in C++
- decompose algebraic data types in C++
- replace visitor pattern with match expressions
- match on class hierarchies without modifying them
- write functional-style code in C++
- destructure objects with nested patterns

## When to choose
- you need expressive pattern matching on variants or class hierarchies in C++
- you want to simplify visitor-pattern-heavy code
- you need open class hierarchies that patterns can match without inheritance changes
- you want a header-only, dependency-free solution

## When to avoid
- your compiler supports C++17/23 std::variant and std::visit or built-in pattern matching proposals
- you need a library with active development and recent maintenance
- you require a permissively licensed dependency (license is non-standard)
- you work in a codebase with strict compiler requirements that Mach7's template tricks may not satisfy

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, programming-language
- domain: programming-languages, developer-tools
- platform: cpp, cross-platform, windows
- tags: pattern-matching, algebraic-data-types, visitor-pattern, variant, functional-programming, header-only, open-class-hierarchies, algorithms, linux, macos

## Member repositories
- solodon4/Mach7 (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:21.669667+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:47:55.550091+00:00, confidence not recorded.
  - readme: https://github.com/solodon4/Mach7 (fetched 2026-08-28T04:04:21.669667+00:00, sha 152e6a46804f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
