logoalt Hacker News

loeglast Wednesday at 8:51 PM1 replyview on HN

What about this representation is hostile to humans and ad-hoc traversals? Don't convenience "getters" basically solve usability?


Replies

uaksomlast Thursday at 12:13 AM

(author here) If you run the parser under a debugger like lldb, then attempt to inspect the AST of a program, it appears as an array of u64. Not very useful, unless you work on special support for debuggers (such as a python script to unpack it in lldb). Compare that to a tree of pointers, you can "expand" nodes without any extra effort.

show 1 reply