4 ms·
[author here] ROX avoids implicit structural sharing and persistent data structures. Allocation and mutation are explicit - if I want a modified container, I co
by hedayet 8mo ago
[author here] ROX avoids implicit structural sharing and persistent data structures. Allocation and mutation are explicit - if I want a modified container, I construct one.
This is intentionally more resource-intensive. ROX trades some efficiency for simplicity and predictability.
The goal is clarity of logic and clarity of behavior, even at slightly higher cost. And future optimizations should preserve that model rather than hide it.
- amluto 8mo agoI would check your “slightly”. If I have an algorithm that operates on an n-element data structure through a helper function (this includes almost any nontrivial program - think managing caches, small databases or tables, lists of clients, etc), you get an extra multiplicative factor of n for each operation. All those nice linear-time or n-log-n algorithms turn into n^2, and accidentally quadratic programs can be bad news. And if the language offers no facility at all to get the factor of n back, users may be forced to use something else.