Talk:LIFO (computing)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Better analogy?[edit]

Could a stack of plates be used as a better analogy to help explain LIFO rather than a crowded elevator?

eg: a dish is placed on top of the stack, and when one is needed, it's taken off the top of the stack.

You're onto something, but the problem with plates is that their order doesn't really make a difference as they're typically all the same. --TuukkaH 13:30, 1 May 2006 (UTC)[reply]

But it's still better than the rubbish elevator analogy. What about a queue for the checkout at the supermarket? The firstone there is the first one to leave.

Well, queue is not a stack and therefore not a LIFO but FIFO structure! Better analogy is a bookshelf where you place books on the top of one another. This way you can directly access only the last book you placed on the top. They are all books (the same class) but different ones (different objects - instances). --kostandin 22:55, 17 August 2006 (UTC)[reply]
Unfortunately books tend to get placed in a bookshelf next to one another ;-) Trying to come up with stacks, I remember in carpet shops and the likes, the salesperson would show the carpets in a huge stack by taking the topmost and moving it to the top of another stack. --TuukkaH 23:43, 17 August 2006 (UTC)[reply]
Lipshultz uses an illustration of a spring loaded commercial dish stack cart/holder, where the bottom spring compresses as dishes are added, and pushes up as they are taken off. This is fine as a graphic, but only as a graphic. (repeated in line as commented out note) I tend to agree the observation elsewhere on this page that dishes are too similar (as are pieces of paper) without a graphic aid showing the forced ordering. // FrankB 16:59, 24 October 2007 (UTC)[reply]

Another one?[edit]

What about Magic: The Gathering's stack? —The preceding unsigned comment was added by 71.127.122.7 (talk) 09:47, 11 March 2007 (UTC).[reply]

That's a FIFO stack.
It also seems sort of obscure. I feel plate analogy seems to work well.Dragonheartman (talk) 22:17, 26 March 2009 (UTC)[reply]


actually, it is a LIFO queu and i think it should be in the article:

from the official comprehensive rules:


LIFO (Informal) An acronym for "Last In, First Out," LIFO is the order in which spells and abilities resolve after going on the stack. The last played is resolved first. See rule 409, "Playing Spells and Activated Abilities," and rule 413, "Resolving Spells and Abilities."

http://www.wizards.com/magic/comprules/MagicCompRules071001.txt

129.125.103.83 (talk) 21:35, 15 January 2008 (UTC)[reply]

Cleanup[edit]

I have added the cleanup tag, The first paragraph under "In Computer" seems to have had a cut off ending as it does not make sense and finishes with a comma. The further 2 lines are awkward and I am sure somebody with the appropriate literary skills could rewrite them into something better. 203.214.82.130 12:14, 28 August 2007 (UTC)[reply]

  • Fixed, sorry about that! (my bad) // FrankB 16:26, 24 October 2007 (UTC)[reply]

Added {Unref}[edit]

  • and a references section. A few text book references, even indirect mentions of stacks and stack operations should be good enough. Ahhh, got one--Schaum's Data Structures! My bookshelves seem more bent toward algorithm texts. // FrankB 16:26, 24 October 2007 (UTC)[reply]

It occurs to me[edit]

duplicate post of

http://en.wikipedia.org/wiki/Talk:FIFO#It_occurs_to_me

after THIS CHANGE, that the article has been slanted by the experience and knowledge of it's contributors without understanding the distinctions involved into one that is essentially a computing article. LIFO and FIFO are in essence Information Theory topics which are implemented in computing as stack (data structure) and queue (data structure), for computer manipulation of data. Management science and certainly accounting use of the same term suggests perhaps both these topics be rewritten to be a general Information sciences treatment and leave the computer implementations to the articles on stacks and queues!

  • See also the discussion on talk:FIFO about merging, which supports my thought. // FrankB 20:30, 24 October 2007 (UTC)[reply]

{{cat also}}

Other meanings[edit]

'Last in first out' is also a common term in employment contracts in the UK at least, where troubled companies make the last employees to join redundant first, hence 'last in first out'. Its very common in large factories etc. where work is not inherantly skilled and so removing the newest worker won't reduce the capabilities of the organisation. Perhaps it should be included here or on a disambig page. WikipedianProlific(Talk) 23:32, 17 November 2007 (UTC)[reply]

Proposed merge with Stack (abstract data type)[edit]

A stack is also known as a LIFO queue; and any data structure that has LIFO behavior is per definition a stack. In fact the article LIFO (computing) discusses stacks at length. QVVERTYVS (hm?) 09:46, 13 August 2014 (UTC)[reply]

  • Support: Merging LIFO (computing) into Stack (abstract data type) would make sense, as LIFO (computing) pretty much either repeats what's already in Stack (abstract data type), or contains what should be there. — Dsimic (talk | contribs) 03:10, 16 August 2014 (UTC)[reply]
    • Oppose: On second though, LIFO (computing) should deserve a separate article, at least because it's a common term, and maybe so we keep it within Google search results for "LIFO". In that scenario, LIFO (computing) should be trimmed down to a stub, leaving only a brief description of "LIFO" as a term while pointing to Stack (abstract data type) for further information. — Dsimic (talk | contribs) 03:19, 16 August 2014 (UTC)[reply]
      Sounds like the resulting page would violate WP:DICDEF as only expanding an acronym. QVVERTYVS (hm?) 15:52, 16 August 2014 (UTC)[reply]
      It might collide with this guideline, but not necessarily as we can provide a condensed overview of the whole thing instead of simply expanding "LIFO" as an acronym. There should be enough "meat" for something like that. — Dsimic (talk | contribs) 05:15, 17 August 2014 (UTC)[reply]
      Honestly, I doubt it. If you look at this article, you'll find that its sources are all about the stack ADT, and the content that at first glance is not about stacks is very thin. But we can start by trimming away the duplicate stuff and peacock words, and see what remains. QVVERTYVS (hm?) 08:18, 17 August 2014 (UTC)[reply]
      Sounds like a plan to me – let's defluff the article and decide when we see what remains there. — Dsimic (talk | contribs) 08:28, 17 August 2014 (UTC)[reply]
      Ok, I've trimmed down the article. Thoughts? — Dsimic (talk | contribs) 08:55, 17 August 2014 (UTC)[reply]
      The article still seems to describe a stack ADT to me, since any situation where data is stored in LIFO order, the resulting data structure can be thought of as a stack. Maybe a more senior computer scientist such as David Eppstein would like to shed some light on this? :) QVVERTYVS (hm?) 14:09, 17 August 2014 (UTC)[reply]
  • Support. I don't see much distinction to be drawn for what are basically two names for the same thing. Per WP:NOTDICT, we should have separate articles only when we have separate concepts, not just because we have different names for the same concept. —David Eppstein (talk) 16:47, 17 August 2014 (UTC)[reply]
    Hello there! That makes sense, but please have a look at traffic stats for the LIFO (computing) artice; people are accessing this article, most probably through Google searches, and all that is pretty much going to be lost after the merger. I'm not aware whether something like that could be a valid reason to keep an article, but there's a not-to-be-ignored demand for "LIFO" as a search term. — Dsimic (talk | contribs) 07:23, 18 August 2014 (UTC)[reply]
    Don't search engines pick up the redirect if we also put LIFO in the other article's lede? QVVERTYVS (hm?) 09:42, 18 August 2014 (UTC)[reply]
    I've seen examples where that wasn't the case, but unfortunately I'm unable to recall exactly. I've just tried a few searches using terms included in lead sections, and it seems that Google had picked them up properly. So, until I get to recall what I've seen back at the time, we can probably assume that Google picks up terms from lead sections. — Dsimic (talk | contribs) 20:17, 18 August 2014 (UTC)[reply]

I've boldly performed the merge. @Dsimic: let's see what the search engines do. QVVERTYVS (hm?) 15:02, 25 January 2015 (UTC)[reply]

When looking at the traffic stats for the LIFO (computing) redirect, they don't seem to be affected at all. Though, when looking at the search results for "LIFO", for some reason they're pretty bad as it seems that Stack (abstract data type) is nowhere to be found; as we know, LIFO (computing) used to be on top of the search results. Perhaps we should wait for a few more days, but the changes should've been already picked up since the merger was performed. By the way, I've tagged the redirect and talk pages, following the WP:PROMERGE procedure. — Dsimic (talk | contribs) 06:22, 29 January 2015 (UTC)[reply]
Thanks. That reminds me that I have some more merged articles to tag. QVVERTYVS (hm?) 09:54, 29 January 2015 (UTC)[reply]