Skip to content
Hissssst edited this page Feb 1, 2023 · 1 revision
  1. Why are there slashes instead of comma in path/2 macro?
    This is done to reflect filesystem paths and to ensure that path/2 always accepts a known-at-compile-time amount of keys. If you want to specify keys as a list, you can use Pathex.Accessibility.from_list/2

  2. Why is it so much faster?
    Pathex generates nested (or not) case-s for getters and setters. This approach leverages Erlang's pattern-matching compiler, which generates most efficient access instructions

Clone this wiki locally