This refactoring aims to solve a couple of issues of the current
implementation of alist-access.ily
The function to get values from the tree has a not well defined
behaviour for missing values: in case of missing values it will
return #f, however #f is also a legitimate value, hence we
cannot distinguish in wuich case we are into. (see #68)
All the tree-related functions accept a parser and a location as
arguments. This means that they can be used only in contexts
where such values are in scope. This means that these values
need to be passed down the call stack, leading to code that is,
arguably, more cluttered.
The new tree module defines a well-specified public interface, where
missing values are signaled without ambiguity (see the API averview in
tree.scm above for a summary). Moreover, none of this module's functions
relies on parser' andlocation' values, hence they are simpler to use
in contexts where such values are unavailable.
I don't mean to sound rude towards @jpvoigt , I simply took the occasion
offered by #68 to refactor his work addressing also issue (2) of the above
list, which in my opinion simplifies the usage of the tree data structure :-)
This refactoring aims to solve a couple of issues of the current implementation of alist-access.ily
The new tree module defines a well-specified public interface, where missing values are signaled without ambiguity (see the API averview in tree.scm above for a summary). Moreover, none of this module's functions relies on
parser' and
location' values, hence they are simpler to use in contexts where such values are unavailable.I don't mean to sound rude towards @jpvoigt , I simply took the occasion offered by #68 to refactor his work addressing also issue (2) of the above list, which in my opinion simplifies the usage of the tree data structure :-)