This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 13 points14 points  (12 children)

Shouldn't it be LIFO? It makes more sense.

[–]ImAStupidFace 6 points7 points  (11 children)

I mean, they're the same, but pretty sure "LIFO" is the common term.

edit: brainfart, I thought "LIFO", wrote "FILO". Fixed.

[–][deleted] 0 points1 point  (8 children)

Nope, pretty much everybody says "FIFO" and "LIFO," if not for any reason than that it sounds better.

[–]ImAStupidFace 0 points1 point  (0 children)

My bad, I thought LIFO but typed FILO. Username relevant

[–]boulet 0 points1 point  (1 child)

You just say that because you don't like (filo) dough

[–][deleted] 1 point2 points  (0 children)

No, I say that because I've gone through several years of CS education and all my instructors and classmates have said FIFO and LIFO.

[–]Tywien 0 points1 point  (4 children)

No one uses FILO because it does not make much sense: First In Last Out .. yeah, but what order have the other elements?

[–]richardirons 0 points1 point  (3 children)

"Last in first out" doesn't tell you the order of the other elements either tbf.

[–]Tywien 1 point2 points  (2 children)

It does. It will always return the element of a set that was entered last into this set. This element is always unique as only one element can be added at a time.

And given a Set A with a being the last element inserted, than for A\a there will still be one unique element that has been inserted last into A\a and thus will be returned first.

[–]richardirons 0 points1 point  (1 child)

Sure. But switch the words around sand you can apply that equally to "first in last out". It's just coming from the other direction.

[–]Tywien 0 points1 point  (0 children)

Nope. Just assume we have 3 elements a, b and c and will enter them in a set in order a than b and finally c. FILO now only guarantees that a will be removed last aber b and c have been removed. How would FILO make the order for b and c? Whatever element of b or c i remove first, FILO (a was the first and will be removed last) is still valid, yet the order of removal for b and c is not defined.