5 ms·
The original use of "stack" as a metaphor in programming should trace to assembly language, but I do not see any mention of that here. I would guess the people
by 3xblah 8y ago
The original use of "stack" as a metaphor in programming should trace to assembly language, but I do not see any mention of that here. I would guess the people who have transformed the term into a "buzzword" are not well-versed in assembler.
- taneq 8y agoThat's not really what they mean by 'stack' in this context, though. That's a 'stack' as a form of memory management, which is just a LIFO queue. In this sense they mean a "software stack" which is just a bunch of nested software systems (eg. OS <--> Web server <--> Web application).
- np_tedious 8y agoPeople have stretched the concept quite far, but your example IS a stack with a meaningful concept of up and down. Can you replace the application while leaving the OS in tact? Of course. Now try replacing the OS without impacting the other two.
- taneq 8y agoVirtualBox would like a word with you.
- indigochill 8y agoLet's say you have an Ubuntu OS in Virtualbox, and an application is running "on top" of Ubuntu. Now try swapping out the Ubuntu OS for Windows without affecting the application. It's nonsense, because an application only works when there's an OS to provide an abstraction layer for talking to hardware. Of course, there are applications that run on bare metal without that abstraction layer, but the point I'm making is that in stacks with an OS, an application "on top" of that OS is not independent of the OS even with virtualization.
- taneq 8y agoIt's not independent of the OS that it's expecting, obviously. But anything below that OS can be swapped out via virtualisation.
- np_tedious 8y agoIt still necessitates a restart, at the very least
- astrobe_ 8y agoThe OSI model is stack with a top and a bottom, but each layer can be replaced, in theory. The processor stack and a software stack really are distinct things, because the "software stack" has the notion of interfaces at the top and the bottom of each layer. The fact that at the implementation level, the call stack sometimes mirrors the software stack is not really relevant. It's sort of accidental: each layer could be a process, connected with other layers by a pipe for instance.
- taneq 8y ago> but each layer can be replaced, in theory. That's literally the entire point of the abstraction. Each layer is independent and can do its thing without considering what other layers are doing. Of course, like all abstractions, it's leaky, which leads to things like Nagle's algorithm causing lag in MMORPGs when devs don't turn it off (no offense, Animats! :D )
- agumonkey 8y agonot prior ? I've read that stack were brought to solve recursive functions, I'm not sure it was tied to assembly or brought in a more theoretical manner
- hderms 8y agostack-based memory allocation is the proper way to model data local to procedures in a call stack.
- tonyedgecombe 8y agoThat's almost a tautology.
- agumonkey 8y agoI'd say almost a bitautology stack => memory allocation :- local variables on call stack
- arethuza 8y agoDidn't Alan Turing come up with what was effectively a call stack for subroutines with "bury" and "disinter" for the ACE? I think that probably predates assembly language programming!
- mcguire 8y agoThere's a "stack" data structure. There's also a "stack", a layered architecture. Don't confuse the two. They're unrelated.