Patternia v0.8.3 Release Note¶
Release Date: March 9, 2026
Version: 0.8.3
Overview¶
Patternia v0.8.3 was an API ergonomics release in the 0.8 line.
The direct match(subject, case...) entry introduced there has since been
removed as the library converged on the pipeline form.
Highlights¶
Historical Note: Direct Match Entry¶
v0.8.3 temporarily added a direct match(subject, case...) overload.
That form is no longer part of the public API. The modern spelling is:
int r = match(x) | on(
lit(1) >> 100,
lit(2) >> 200,
_ >> 0
);
Wildcard Alias: _¶
_ is the public wildcard spelling:
match(x) | on(
lit(1) >> 10,
_ >> 0
);
Bind Shorthand: $¶
$ is a concise alias for bind(), reducing noise in value-capture patterns:
match(x) | on(
$[_0 > 0] >> [](int v) { return v * 2; },
_ >> 0
);
Guard Placeholders: _0, _1, _2, _3¶
New shorthand aliases for arg<0> through arg<3>. The bare _ guard
placeholder is deprecated in favor of _0:
// Before
bind()[_ > 0 && _ < 10]
// After
$[_0 > 0 && _0 < 10]
Bug Fixes¶
- Fixed
pred_and/pred_orfailing to unwrap tuple when invoking raw callables in mixed guard expressions (e.g.,_0 > 1u && is_even). Addeddetail::invoke_guardto handle tuple unpacking for non-guard predicates.
Deprecations¶
- The older single-value guard placeholder backing
_is deprecated. Use_0instead. The_name is now reserved for the wildcard pattern.
Internal¶
- Migrated all tests, samples, and benchmarks from
_to_0for guard expressions. - Updated documentation to reflect new placeholder naming.