PropertyFunctions.jl

This package provides functionality for easy access to and efficient broadcasting over properties.

PropertyFunctions defines the macro @pf that can be used to quickly access properties of objects and broadcast efficiently over collections of objects, e.g. via xs .|> @pf $a + $c^2. The macro @fp provides the inverse escaping convention, e.g. xs .|> @fp a + c^2.

Broadcasting functions generated by @pf is GPU-friendly and will try to return a StructArray if the functional expression generates a struct (resp. a NamedTuple).

The package also provides convenience functions sortby and filterby that work well with functions generated by @pf (but are compatible with generic functions as well), and innermerge to merge the columns of table-like objects.

Property functions can be used with map and filter directly and get the same column-access optimizations there as in broadcasting.