You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The list implementation is simple/nice but it imposes a limit on number of stored elements because of "additional effect" of recursive destruction. A garbage collector would be very nice indeed, without it I don't know if using a "production persistent List" is really possible.
The text was updated successfully, but these errors were encountered:
Either garbage collection, or tail recursion optimization would fix the problem. But there are many problems in which the length of the list is bounded -- as in the eight queen problem. Also, there are alternatives to lists -- tree-like structures.
This library should be treated as a proof of concept. I was worried more about correctness and ease of use (especially in backtracking algorithms) than about performance.
It also points out at inherent shortcomings of C++. Contrary to popular belief, C++ is not an optimal implementation language for a whole slew of very useful data structures and algorithms.
Hy,
The list implementation is simple/nice but it imposes a limit on number of stored elements because of "additional effect" of recursive destruction. A garbage collector would be very nice indeed, without it I don't know if using a "production persistent List" is really possible.
The text was updated successfully, but these errors were encountered: