blog.jj5.net (2003 to 2005)

ArrayList - tautology or what?

Sat Jan 10 05:13:00 UTC+1100 2004

Categories:

I went to bed last night at about 4am, and I was lying there, and it crossed my mind that I had always been annoyed with the name of the ArrayList object in the .NET framework. It's a really handy class, especially it you are just hacking something together and aren't too concerned about type safety. But why on earth is it called an 'ArrayList'? Its purpose is to provide an IList implementation, so why isn't it just called 'List', or 'ObjectList' or 'GenericList' or something like that..?

I got out of bed and I had a look in MSDN at the ArrayList overview, and it quotes that it is implemented using an Array. So really, ArrayList means, 'List implemented with an Array'. So now I understand why. Of course having got up to figure that out, I then stayed up for another 6 hours, I wonder if anyone else is loosing sleep over the names of .NET classes.. :P

John.


Copyright © 2003-2005 John Elliot