3 ms·
The reason for this is that the tree organizes the program into pieces that are (mostly) semantically meaningful, whereas representing the program as a string d
by torstenvl 9y ago
The reason for this is that the tree organizes the program into pieces that are (mostly) semantically meaningful, whereas representing the program as a string doesn't. It's the exact same phenomenon that makes it easier to manipulate HTML correctly using a DOM rather than with regular expressions.
Mind. Blown. Your whole comment is incredible. I've never thought about it this way or realized what the value proposition was. Thanks!