I wonder if there are lots of programmers out there who understand recursion perfectly well but don't trust it because they learnt induction arguments later in life, haven't completely internalized them, and so don't entirely believe them in their guts (so to speak)
-
-
True. But I see plenty of resistance even when it's easy to bound stack usage. (And yeah, it's weird how stack is a valuable resource we need to manage but it's pretty difficult to do the job of managing it.)
-
That's why I've always wanted a language with a type system that can track code complexity (in terms of time, resource usage, etc). It could even be Haskell - but every value would need to have multiple, independent, types (not tuples of types).
End of conversation
New conversation -
-
-
I'd like to have compilers help me with this. With acyclic call graphs, they should statically compute the maximum stack use of a function; with cycles, I'd like to be able to provide a bound or something (and be able to fail usefully if the bound is exceeded, rather than crash).
-
Interesting. I’d only want the assurance that the stack can grow up to some significant fraction of available machine memory and then that it would safely fault without introducing insecurity.
- 1 more reply
New conversation -
-
-
It’s 512KB for iOS frameworks. This information is hidden very deep in the documents. Can’t even tell if it’s the latest state https://twitter.com/chunkyguy/status/1234851061820727297?s=21 …https://twitter.com/chunkyguy/status/1234851061820727297 …
-
That's the worst of all worlds! Reserving a big chunk of stack even though you end up using the heap anyway.
- 1 more reply
New conversation -
-
-
Tail recursion more or less works on most Compilers nowadays. Nevertheless it would still be nice to force it on a tailcall in debug builds or have an error in the (rare) occurrence when the compiler fails to tailcall.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
When I moved away from working on 1990s-era laser printers it was actually hard to leave the mindset that every malloc was going to fail with high probability (and trigger a complicated concurrent reclamation cycle before it finally failed).
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.