EponymTuples.jl

Julia package for deconstructing dispatch on NamedTuples.
Author tpapp
Popularity
12 Stars
Updated Last
2 Years Ago
Started In
September 2018

EponymTuples

Lifecycle Build Status Coverage Status codecov.io

Julia package for deconstructing dispatch on NamedTuples.

Uses the variable names both for the NamedTuple and deconstruction.

Allows replacing

f((a, b)::NamedTuple{(:a, :b), <: Tuple{Any, Int}}) = ...

(a = a, b = b, c = 3)

with

f(@eponymargs(a, b::Int)) = ...

@eponymtuple(a, b, c = 3)

It is pretty lightweight: @eponymargs and @eponymtuple are the only symbols exported; and the package has no dependencies.

The package is registered, install with

pkg> add EponymTuples