Forum Discussion

EnTerr's avatar
EnTerr
Roku Guru
12 years ago

The difference between roList and roArray? [explained]

I just realized tonight there are two different types roList and roArray - and that i don't know what the difference between them is, silly me. Normally when in doubt reading documentation helps but not this time; nothing in the forum too. So here goes, what's the difference between roList and roArray? Why are there two different types that seem to do the same thing?

The matching interfaces ifList and ifArray have bunch of methods that do the same:
ifList           ifArray
------- -------
AddTail(x) = Push(x)
RemoveTail() = Pop()
AddHead(x) = Unshift(x)
RemoveHead() = Shift()
GetTail() = Peek()
GetHead() = a[0]

And not only that but roList besides ifList implements ifArray (as well as all the other lesser interfaces of roArray) to, so all methods from both columns work on it. Curious and curiouser. I know there must have been some inner logic but it does not come to me. Does someone know?
No RepliesBe the first to reply