4 ms·
Would be nice to see more serious study of this for a language like C++. It would take either TCO or Garbage Collection to make reliable, robust persistent data
by hellofunk 11y ago
Would be nice to see more serious study of this for a language like C++. It would take either TCO or Garbage Collection to make reliable, robust persistent data structures a possibility in C++, and more would prefer TCO of these two. That would open a big door into more powerful functional programming idioms for C++ than currently exist, even with the latest language standards.
- adrianm 11y agoHow would TCO help? I've never read anything about the connection between TCO and persistent data structures. GC on the other hand is a known, and often assumed, requirement in the literature. Sounds interesting!
- jacquesm 11y agoTCO can be done more readily if you know for a fact that all the parameters passed into the function were not modified during the execution of the function.
- GFK_of_xmaspast 11y agoMore reasons to be aggressive about marking things const.
- hellofunk 11y agoconsider this interesting discussion: https://github.com/BartoszMilewski/Okasaki/issues/1#issuecomment-164554799 https://github.com/BartoszMilewski/Okasaki/issues/1#issuecom... his blog has more details
- pjc50 11y agoCompilers already implement some TCO. What specifically do you mean about "reliable, robust persistent data structures" that you think is currently not possible in C++?
- hellofunk 11y agoSee here: https://github.com/BartoszMilewski/Okasaki/issues/1#issuecomment-164554799 https://github.com/BartoszMilewski/Okasaki/issues/1#issuecom... This guy knows what he is talking about. His blog has a lot of interesting discussion in this area.