Closed zbraniecki closed 4 years ago
I think I'll keep it for 0.7 at least.
It still serves two purposes - it can be a value of FluentValue::Error
which makes it perfect for lazy formatting into a string (think "{-term.attr}" fallback) and it can generate an error.
The big win here is that it is lazy, so it uses minimal amount of memory (one enum and max two refs) and can be passed around with an intention to be used as an error format/reason in case an error scenario is encountered (in track
for example).
I'd like to revisit that when we work on reference resolver and unify between JS resolver and Rust.
This has been removed by #199.
Originally
DisplayableNode
was useful because it covered two use cases at once - it provided a hashable unit for tracking of cycles, and for displaying error information.With the recent move to hash on references to patterns, we may be able to simplify that or even fold into
FluentValue::Error
.