4 ms·
Also true! And in very real sense literally what I meant. But not so much in the conditional branch sense of the phrase “control flow”. More like, I’ve got a
by benreesman 2y ago
Also true! And in very real sense literally what I meant.
But not so much in the conditional branch sense of the phrase “control flow”.
More like, I’ve got a bunch of references and one of them is a reference to a function I might evaluate, damn, I need that reference and the transitive closure of everything it knows about, all of which are probably on the heap.
- zozbot234 2y agoThe proper name for this is a "space leak". Also known as: "you wanted a banana, but what you got was a gorilla holding the banana and the entire jungle". This is of course pretty much the opposite of low-level "performance" - and it's also the kind of problem that tracing garbage collection was actually designed to address when first developed.
- benreesman 2y agoFake news and FUD and other balderdash. A space leak, much like any memory leak is when you or the compiler or the runtime or whoever misplaces such reference. GHC having a closure in scope in no way immediately means there is a space leak. Plenty of Haskell code that compiles to thunks will run all day in an amortized fixed-size heap. Much like Erlang, which is what Joe Armstrong had designed before he said the thing about jungles you’ve quoted. And it is in no way difficult or even really rare to drop an Arc in a table and leak all over the place. Rust has all the same computer science problems as anything else. Full stop.