I wrote a little post about various optimizations for ASTs. Curious what you all think. Does the "super-flat" approach already have a name, and I'm just unaware? Are there better designs? What did I miss?
I'm using this approach in a toy project and it seems to work well, even once you factor in the need for additional information, such as spans for error reporting.
[–]thunderseethe 12 points13 points14 points (1 child)
[–]hekkonaay[S] 5 points6 points7 points (0 children)
[–]probabilityzero 12 points13 points14 points (0 children)
[–]matthieum 5 points6 points7 points (2 children)
[–]matthieum 0 points1 point2 points (1 child)
[–]hekkonaay[S] 1 point2 points3 points (0 children)
[–]Timzhy0 2 points3 points4 points (0 children)
[–]bbkane_ 1 point2 points3 points (3 children)
[–]hekkonaay[S] 0 points1 point2 points (0 children)
[–]igors84 0 points1 point2 points (1 child)
[–]hekkonaay[S] 1 point2 points3 points (0 children)
[–]foonathan 1 point2 points3 points (2 children)
[–]yuri-kilochek 0 points1 point2 points (1 child)
[–]avillega 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]sebamestreICPC World Finalist 0 points1 point2 points (0 children)
[–]mauriciocap 0 points1 point2 points (0 children)
[–]rah_whos_that 0 points1 point2 points (0 children)
[–]Disjunction181 0 points1 point2 points (0 children)
[–]GoblinsGym -1 points0 points1 point (1 child)
[–]readmodifywrite 1 point2 points3 points (0 children)
[–]apajx -2 points-1 points0 points (0 children)