you can, of course, always ditch and go to a more general state-passing style (i.e., monads), but that then causes the state mutations to happen in a way independent of the call-return structure of the stack. This is sometimes necessary, but we should be careful to reach for it.
-
-
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
Controversial opinion: structured programming still uses goto because loops and ifs and, hell, procedure calls are jumps under the hood.
-
It's continuations all the way down! But there's a way to give it all a cool operational semantics.
- Još 5 drugih odgovora
Novi razgovor -
-
-
Every C function is actually the constructor of a temporary object whose `this` pointer is the stack pointer.
-
yeah, powerful observation, here.
- Još 2 druga odgovora
Novi razgovor -
-
-
Maybe less controversial: functional *programming* (the act) still uses state-ish reasoning. Especially when you start converting for tail call elimination.
-
yeah, which also falls down within the extent of more interesting elaborate state-based implementation features such as dynamic continuations.
- Još 1 odgovor
Novi razgovor -
-
-
Pure functional programming doesn't have a stack, only rewrites! Everything is self-modifying code forever >:-)
-
strong disagree.
- Još 2 druga odgovora
Novi razgovor -
-
-
Not exactly. A purely functional language can be *modelled* by substitutions on terms, with no heap or stack. The stack and call/return structure is an implementation detail. The ease in ability to reason comes from referential transparency.
-
I politely disagree with you. I think the difference is that you are talking about functional languages and I am talking about functional *programming*. For the latter, this is not an implementation detail, but it may be for the former.
Kraj razgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.