Skip to content

docs(readme): rewrite the README for v0.9.6 - #111

Merged
biobo-bot[bot] merged 2 commits into
mainfrom
docs/readme-0.9.6
Nov 18, 2026
Merged

biobo-bot[bot] merged 2 commits into
mainfrom
docs/readme-0.9.6

Conversation

@sentomk

@sentomk sentomk commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

Rewrite the README around the v0.9.6 features.

Changes

  • The intro, highlights and quick tour use the new forms: plain values
    in patterns (is<int>(0), any('a', 'e', ...)), $ as the last
    case, expression handlers ($ >> (_ * 3 + 1), >> (x + y)), and
    guards over named struct members.
  • New sections: owning the subject (match(std::move(job)) with a
    std::unique_ptr), reusing case lists (constexpr packs and
    PTN_ON), and a performance section with the plan table from the
    tuning guide and the codegen check.
  • Core concepts: match borrows lvalues and owns rvalues; on ends in
    _ or an unguarded $; handlers may be expressions; plain values
    mean lit(value).
  • Fixes: _ was described as the only fallback, and classify mixed
    lit(0) with val<1> while claiming static dispatch; a mixed list
    is evaluated in source order. The dense example now uses val<N>
    only.
  • Installation, requirements, test and contributing sections are
    unchanged apart from a Performance Tuning link.

Testing

  • Every code example was compiled into one file and run with
    assertions on its results, with -Wall -Wextra -Werror on Apple
    Clang 17 and GCC 13 (C++17).
  • static_asserts confirm that the val<N> opcode example and the
    constexpr parity pack get the dense-table plan.

biobo-bot[bot]
biobo-bot Bot previously requested changes Nov 18, 2026

@biobo-bot biobo-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: request changes

This is a solid README rewrite for v0.9.6. The new forms are used consistently: plain values in patterns (is<int>(0), any('a', 'e', ...)), $ as a last-case fallback, expression handlers, and named-member guards. The mixed lit/val classify example is gone, the event-dispatch placeholders were renamed so they do not clash with the Point bindings, and the PTN_ON scope warning is the right thing to put on the front page.

The examples I checked against the headers and the API docs look correct, including the owning std::unique_ptr match, alt<1>(""), collatz_step ending in $, and the dense val<0x00..0x05> list.

One accuracy issue should be fixed before merge. The owning section and the performance table both present owned/variant dispatch as identical to the borrowed path. The API and the Performance Tuning guide document a real exception: an owned std::variant with four or fewer alternatives is evaluated in source order; the index() switch starts at five alternatives. Please qualify those two places so the README matches the rest of the docs.

Optional, non-blocking: the val<N> row says "on an integer"; the planner also builds that dense table for unscoped enums (scoped enum class currently stays in source order).

Comment thread README.md Resolved
Comment thread README.md Resolved
Show the v0.9.6 forms throughout: plain values inside patterns, `$` as
the last case, expression handlers and guards over named struct
members, and owning matches on rvalue subjects. Add sections on owning
the subject and on reusing case lists, and a performance section that
says which case lists compile to a switch.

Fix two statements that were wrong: `_` is no longer the only fallback,
and the `classify` example that mixed `lit` and `val` claimed static
dispatch, which a mixed list does not get.

@biobo-bot biobo-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: approve

The two accuracy issues from the last review are fixed. The owning section now states that an owned std::variant with four or fewer alternatives is matched in source order, and the performance table qualifies that the index() switch for an owned variant starts at five alternatives. That matches the API and the Performance Tuning guide.

The rest of the v0.9.6 README rewrite still looks consistent with the library: plain values in patterns, $ as a last-case fallback, expression handlers, named-member guards, the owned std::unique_ptr example, and the PTN_ON scope note.

@biobo-bot
biobo-bot Bot dismissed their stale review November 18, 2026 14:28

Superseded: the requested README qualifications were addressed in 2e621f3, which is now approved.

@biobo-bot biobo-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: approve

The owned-variant exception is now documented in both places I asked about: the owning section qualifies that an owned std::variant with four or fewer alternatives is matched in source order, and the performance table notes that the index() switch for an owned variant needs five or more alternatives. That matches the API docs and the Performance Tuning guide.

The rest of the rewrite still looks correct: the v0.9.6 forms, the mixed lit/val classify fix, the event-dispatch placeholders, and the PTN_ON scope note. Moving the performance section up and replacing the gap-map image with the measured table is a clearer front-page summary.

No further changes requested.

@biobo-bot biobo-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: approve

This push merges main into the branch (the v0.9.6 vcpkg portfile SHA512 update from #110). The README corrections from the last review are still in place: the owning section says an owned std::variant with four or fewer alternatives is matched in source order, and the performance table notes that the index() switch for an owned variant needs five or more alternatives.

No further changes requested.

@biobo-bot
biobo-bot Bot merged commit 0513d94 into main Nov 18, 2026
29 checks passed
@biobo-bot
biobo-bot Bot deleted the docs/readme-0.9.6 branch November 18, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant