using arrays vs using lists

BlitzMax Forums/BlitzMax Beginners Area/using arrays vs using lists

I was wondering what were the advantages of using lists (which I'm not familiar with and that look a bit dodgy to me...) versus using arrays.
A list is a good datastructure for any ammounts data where the ammount is difficult to predict. They are most suitable for sequential access (constant time) to data that you cannot say with any degree of certainty how much storage you'll need in advance. Random access however is in linear time.

Manipulating items, by sorting and such is also done in constant time, because you're only changing the individual links, and theres no need to copy any data back and forth.

Arrays on the other hand are good for itams that you know for a fact the maximum number of objects you'll ever have in play. They are also good because sequential and random access can both be done in constant time. However manipulating objects, sorting, compressing, moving and so on is rather expensive - at best linear time.

So you would pick the type of data structure that most closely matches what you're trying to acheive. Any LISP programmer will tell you the list is better - all problems can be solved using lists. And while that is technically true - it's not always fastest.