![]() This is mainly a syntactic trick/sugar, but it's been pretty annoying to me for a while that we can't simply pattern-match/destructure single-variant constructors directly from the args list. A classic example is when writing property tests: ```ak test foo(params via both(bytearray(), int())) { let (bytes, ix) = params ... } ``` Now can be replaced simply with: ``` test foo((bytes, ix) via both(bytearray(), int())) { ... } ``` If feels natural, especially coming from the JavaScript, Haskell or Rust worlds and is mostly convenient. Behind the scene, the compiler does nothing more than re-writing the AST as the first form, with pre-generated arg names. Then, we fully rely on the existing type-checking capabilities and thus, works in a seamless way as if we were just pattern matching inline. |
||
---|---|---|
.github | ||
crates | ||
examples | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
flake.lock | ||
flake.nix |
README.md
Getting Started
Hello, World!
Wanna get started right-away? Complete the Hello, World! tutorial!
Contributing
Want to contribute? See CONTRIBUTING.md to know how.
Changelog
Be on top of any updates using the CHANGELOG and the Project Tracking.
Stats
[!NOTE]
The name comes from Howard Aiken, an American physicist and a pioneer in computing.