I'll add that to the list of better ways to handle recursive data structures.
This is why I think we need a longer exposition on best practices for representing "absent" things. People have come up with a lot of different approches out in the wild so far. -- John On Oct 9, 2014, at 8:44 AM, Tim Holy <[email protected]> wrote: > On Thursday, October 09, 2014 08:19:19 AM John Myles White wrote: >> And the use of things like an EmptyTree type in DataStructures.jl means that >> absence is also being represented in a type-unstable way in some packages. >> (https://github.com/JuliaLang/DataStructures.jl/blob/master/src/tree.jl) > > Ouch. Why can't nodes that don't point anywhere just point to themselves? > https://github.com/timholy/ProfileView.jl/blob/a1f6b4d2351ebe7e9b3251c1e151ca33ecddf60d/src/tree.jl#L12-L40 > > --Tim >
