3 ms·
Interesting musings. I think the author dismissed graphs a bit too early. Making lists another first-class object (e.g. by always having nodes be lists) might b
by nailuj 8y ago
Interesting musings. I think the author dismissed graphs a bit too early. Making lists another first-class object (e.g. by always having nodes be lists) might be a bit less elegant but would work for his constraints.
The data structure he describes in the last article is actually well known in Prolog as difference lists (except that you can't do higher order logic programming with them). Converting between terms and lists is also well supported by Prolog. Granted, the syntax is not as nice as using S-expressions with special sugar for terms.
- TuringTest 8y agoA free-form graph is hard to serialize. If the goal is to have the syntax close to the meaning, tree terms are simpler, and then graphs can be modeled on top of them. As for lists of lists, the most recent article uses them for an in-memory optimized representation: http://natecull.org/wordpress/2018/08/16/dataspace-10-an-array-representation/ http://natecull.org/wordpress/2018/08/16/dataspace-10-an-arr...