5 ms·
Are you talking about parallel computation? Because serially: def sandwich(): egg() bacon() bread() is pretty much where stacks s
by amelius 4y ago
Are you talking about parallel computation?
Because serially:
def sandwich():
egg()
bacon()
bread()
is pretty much where stacks shine.
- tsegratis 4y agoYes :) it wasn't the clearest example. But is also slightly hard to express I think superscalar architecture for hardware benefits from an explicit graph of dependencies. Then equally the user benefits from reduced need to convert the stack to a graph with SWAP DUP etc -- which is one way to think of the role of those operators (as a stack to graph conversion) On the otherhand some problems are unrepresentable by a graph, and easily represented by a stack; for instance map, reduce, and a bunch of others What I'm suggesting is that both the hardware and the user and arguably even the problem, generally prefer graphs